Struct necsim_core_bond::NonNegativeF64
source · pub struct NonNegativeF64(/* private fields */);
Implementations§
source§impl NonNegativeF64
impl NonNegativeF64
sourcepub const fn new(value: f64) -> Result<Self, NonNegativeF64Error>
pub const fn new(value: f64) -> Result<Self, NonNegativeF64Error>
§Errors
Returns NonNegativeF64Error
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 zero() -> Self
pub const fn one() -> Self
pub const fn infinity() -> Self
pub const fn get(self) -> f64
pub fn neg_exp<M: MathsCore>(self) -> ClosedUnitF64
pub fn sqrt<M: MathsCore>(self) -> NonNegativeF64
Trait Implementations§
source§impl Add<ClosedUnitF64> for NonNegativeF64
impl Add<ClosedUnitF64> for NonNegativeF64
§type Output = NonNegativeF64
type Output = NonNegativeF64
The resulting type after applying the
+
operator.source§fn add(self, other: ClosedUnitF64) -> Self
fn add(self, other: ClosedUnitF64) -> Self
Performs the
+
operation. Read moresource§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 Add for NonNegativeF64
impl Add for NonNegativeF64
source§impl AddAssign for NonNegativeF64
impl AddAssign for NonNegativeF64
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl Clone for NonNegativeF64
impl Clone for NonNegativeF64
source§fn clone(&self) -> NonNegativeF64
fn clone(&self) -> NonNegativeF64
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 NonNegativeF64
impl ComputeTypeSet for NonNegativeF64
source§impl Debug for NonNegativeF64
impl Debug for NonNegativeF64
source§impl<'de> Deserialize<'de> for NonNegativeF64
impl<'de> Deserialize<'de> for NonNegativeF64
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 NonNegativeF64
impl Display for NonNegativeF64
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 Div for NonNegativeF64
impl Div for NonNegativeF64
source§impl From<ClosedOpenUnitF64> for NonNegativeF64
impl From<ClosedOpenUnitF64> for NonNegativeF64
source§fn from(value: ClosedOpenUnitF64) -> Self
fn from(value: ClosedOpenUnitF64) -> Self
Converts to this type from the input type.
source§impl From<ClosedUnitF64> for NonNegativeF64
impl From<ClosedUnitF64> for NonNegativeF64
source§fn from(value: ClosedUnitF64) -> Self
fn from(value: ClosedUnitF64) -> Self
Converts to this type from the input type.
source§impl From<NonNegativeF64> for f64
impl From<NonNegativeF64> for f64
source§fn from(val: NonNegativeF64) -> Self
fn from(val: NonNegativeF64) -> Self
Converts to this type from the input type.
source§impl From<OpenClosedUnitF64> for NonNegativeF64
impl From<OpenClosedUnitF64> for NonNegativeF64
source§fn from(value: OpenClosedUnitF64) -> Self
fn from(value: OpenClosedUnitF64) -> 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<u32> for NonNegativeF64
impl From<u32> for NonNegativeF64
source§impl From<u64> for NonNegativeF64
impl From<u64> for NonNegativeF64
source§impl From<usize> for NonNegativeF64
impl From<usize> for NonNegativeF64
source§impl Hash for NonNegativeF64
impl Hash for NonNegativeF64
source§impl Mul<ClosedUnitF64> for NonNegativeF64
impl Mul<ClosedUnitF64> for NonNegativeF64
§type Output = NonNegativeF64
type Output = NonNegativeF64
The resulting type after applying the
*
operator.source§fn mul(self, other: ClosedUnitF64) -> Self
fn mul(self, other: ClosedUnitF64) -> Self
Performs the
*
operation. Read moresource§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 NonNegativeF64
impl Mul for NonNegativeF64
source§impl Neg for NonNegativeF64
impl Neg for NonNegativeF64
source§impl Ord for NonNegativeF64
impl Ord for NonNegativeF64
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 NonNegativeF64
impl PartialEq<f64> for NonNegativeF64
source§impl PartialEq for NonNegativeF64
impl PartialEq for NonNegativeF64
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 NonNegativeF64
impl PartialOrd<f64> for NonNegativeF64
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 NonNegativeF64
impl PartialOrd for NonNegativeF64
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 NonNegativeF64
impl Serialize for NonNegativeF64
source§impl Sum for NonNegativeF64
impl Sum for NonNegativeF64
source§impl TryFrom<f64> for NonNegativeF64
impl TryFrom<f64> for NonNegativeF64
source§impl TypeLayout for NonNegativeF64
impl TypeLayout for NonNegativeF64
§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 NonNegativeF64
impl Eq for NonNegativeF64
Auto Trait Implementations§
impl Freeze for NonNegativeF64
impl RefUnwindSafe for NonNegativeF64
impl Send for NonNegativeF64
impl Sync for NonNegativeF64
impl Unpin for NonNegativeF64
impl UnwindSafe for NonNegativeF64
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.