Struct necsim_core_bond::PositiveF64
source · pub struct PositiveF64(/* private fields */);
Implementations§
source§impl PositiveF64
impl PositiveF64
sourcepub const fn new(value: f64) -> Result<Self, PositiveF64Error>
pub const fn new(value: f64) -> Result<Self, PositiveF64Error>
§Errors
Returns PositiveF64Error
if not 0.0 < value
sourcepub const unsafe fn new_unchecked(value: f64) -> Self
pub const unsafe fn new_unchecked(value: f64) -> Self
§Safety
Only safe iff 0.0 < value
pub const fn one() -> Self
pub const fn infinity() -> Self
pub const fn get(self) -> f64
pub const fn max_after(before: NonNegativeF64, value: NonNegativeF64) -> Self
Trait Implementations§
source§impl Add<NonNegativeF64> for PositiveF64
impl Add<NonNegativeF64> for PositiveF64
§type Output = PositiveF64
type Output = PositiveF64
The resulting type after applying the
+
operator.source§fn add(self, other: NonNegativeF64) -> Self
fn add(self, other: NonNegativeF64) -> Self
Performs the
+
operation. Read moresource§impl Add<PositiveF64> for NonNegativeF64
impl Add<PositiveF64> for NonNegativeF64
§type Output = PositiveF64
type Output = PositiveF64
The resulting type after applying the
+
operator.source§fn add(self, other: PositiveF64) -> PositiveF64
fn add(self, other: PositiveF64) -> PositiveF64
Performs the
+
operation. Read moresource§impl Clone for PositiveF64
impl Clone for PositiveF64
source§fn clone(&self) -> PositiveF64
fn clone(&self) -> PositiveF64
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ComputeTypeSet for PositiveF64
impl ComputeTypeSet for PositiveF64
source§impl Debug for PositiveF64
impl Debug for PositiveF64
source§impl<'de> Deserialize<'de> for PositiveF64
impl<'de> Deserialize<'de> for PositiveF64
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PositiveF64
impl Display for PositiveF64
source§impl Div<PositiveF64> for NonNegativeF64
impl Div<PositiveF64> for NonNegativeF64
§type Output = NonNegativeF64
type Output = NonNegativeF64
The resulting type after applying the
/
operator.source§fn div(self, other: PositiveF64) -> Self
fn div(self, other: PositiveF64) -> Self
Performs the
/
operation. Read moresource§impl From<NonZero<u32>> for PositiveF64
impl From<NonZero<u32>> for PositiveF64
source§fn from(value: NonZeroU32) -> Self
fn from(value: NonZeroU32) -> Self
Converts to this type from the input type.
source§impl From<NonZero<u64>> for PositiveF64
impl From<NonZero<u64>> for PositiveF64
source§fn from(value: NonZeroU64) -> Self
fn from(value: NonZeroU64) -> Self
Converts to this type from the input type.
source§impl From<PositiveF64> for NonNegativeF64
impl From<PositiveF64> for NonNegativeF64
source§fn from(value: PositiveF64) -> Self
fn from(value: PositiveF64) -> Self
Converts to this type from the input type.
source§impl From<PositiveF64> for f64
impl From<PositiveF64> for f64
source§fn from(val: PositiveF64) -> Self
fn from(val: PositiveF64) -> Self
Converts to this type from the input type.
source§impl Hash for PositiveF64
impl Hash for PositiveF64
source§impl Mul<PositiveF64> for NonNegativeF64
impl Mul<PositiveF64> for NonNegativeF64
§type Output = NonNegativeF64
type Output = NonNegativeF64
The resulting type after applying the
*
operator.source§fn mul(self, other: PositiveF64) -> Self
fn mul(self, other: PositiveF64) -> Self
Performs the
*
operation. Read moresource§impl Mul for PositiveF64
impl Mul for PositiveF64
source§impl Ord for PositiveF64
impl Ord for PositiveF64
source§impl PartialEq<NonNegativeF64> for PositiveF64
impl PartialEq<NonNegativeF64> for PositiveF64
source§fn eq(&self, other: &NonNegativeF64) -> bool
fn eq(&self, other: &NonNegativeF64) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<PositiveF64> for NonNegativeF64
impl PartialEq<PositiveF64> for NonNegativeF64
source§fn eq(&self, other: &PositiveF64) -> bool
fn eq(&self, other: &PositiveF64) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<f64> for PositiveF64
impl PartialEq<f64> for PositiveF64
source§impl PartialEq for PositiveF64
impl PartialEq for PositiveF64
source§impl PartialOrd<NonNegativeF64> for PositiveF64
impl PartialOrd<NonNegativeF64> for PositiveF64
source§fn partial_cmp(&self, other: &NonNegativeF64) -> Option<Ordering>
fn partial_cmp(&self, other: &NonNegativeF64) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<PositiveF64> for NonNegativeF64
impl PartialOrd<PositiveF64> for NonNegativeF64
source§fn partial_cmp(&self, other: &PositiveF64) -> Option<Ordering>
fn partial_cmp(&self, other: &PositiveF64) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<f64> for PositiveF64
impl PartialOrd<f64> for PositiveF64
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd for PositiveF64
impl PartialOrd for PositiveF64
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for PositiveF64
impl Serialize for PositiveF64
source§impl TryFrom<f64> for PositiveF64
impl TryFrom<f64> for PositiveF64
source§impl TypeLayout for PositiveF64
impl TypeLayout for PositiveF64
§type Inhabited = <And<<f64 as TypeLayout>::Inhabited, Inhabited> as ComputeInhabited>::Output
type Inhabited = <And<<f64 as TypeLayout>::Inhabited, Inhabited> as ComputeInhabited>::Output
Marker type for whether the type is
inhabited or
uninhabited.
The associated type must be either [
inhabited::Inhabited
]
or [inhabited::Uninhabited
].source§const TYPE_LAYOUT: TypeLayoutInfo<'static> = _
const TYPE_LAYOUT: TypeLayoutInfo<'static> = _
Shallow layout of the type.
impl Copy for PositiveF64
impl Eq for PositiveF64
Auto Trait Implementations§
impl Freeze for PositiveF64
impl RefUnwindSafe for PositiveF64
impl Send for PositiveF64
impl Sync for PositiveF64
impl Unpin for PositiveF64
impl UnwindSafe for PositiveF64
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> ExtractDiscriminant for T
impl<T> ExtractDiscriminant for T
§type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
The type of the discriminant, which must satisfy the trait bounds
required by
core::mem::Discriminant
. Read more§impl<T> TypeGraphLayout for Twhere
T: TypeLayout + ComputeTypeSet,
impl<T> TypeGraphLayout for Twhere
T: TypeLayout + ComputeTypeSet,
§const TYPE_GRAPH: TypeLayoutGraph<'static> = _
const TYPE_GRAPH: TypeLayoutGraph<'static> = _
Shallow layout of the type.