Struct necsim_core_bond::ClosedUnitF64
source · pub struct ClosedUnitF64(/* private fields */);
Implementations§
source§impl ClosedUnitF64
impl ClosedUnitF64
sourcepub const fn new(value: f64) -> Result<Self, ClosedUnitF64Error>
pub const fn new(value: f64) -> Result<Self, ClosedUnitF64Error>
§Errors
Returns ClosedUnitF64Error
if not 0.0 <= value <= 1.0
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 <= 1.0
pub const fn zero() -> Self
pub const fn half() -> Self
pub const fn one() -> Self
pub const fn get(self) -> f64
pub const fn one_minus(self) -> Self
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 Clone for ClosedUnitF64
impl Clone for ClosedUnitF64
source§fn clone(&self) -> ClosedUnitF64
fn clone(&self) -> ClosedUnitF64
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 ClosedUnitF64
impl ComputeTypeSet for ClosedUnitF64
source§impl Debug for ClosedUnitF64
impl Debug for ClosedUnitF64
source§impl<'de> Deserialize<'de> for ClosedUnitF64
impl<'de> Deserialize<'de> for ClosedUnitF64
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 ClosedUnitF64
impl Display for ClosedUnitF64
source§impl Div<NonZero<u32>> for ClosedUnitF64
impl Div<NonZero<u32>> for ClosedUnitF64
§type Output = ClosedUnitF64
type Output = ClosedUnitF64
The resulting type after applying the
/
operator.source§impl From<ClosedOpenUnitF64> for ClosedUnitF64
impl From<ClosedOpenUnitF64> for ClosedUnitF64
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<ClosedUnitF64> for f64
impl From<ClosedUnitF64> for f64
source§fn from(val: ClosedUnitF64) -> Self
fn from(val: ClosedUnitF64) -> Self
Converts to this type from the input type.
source§impl From<OpenClosedUnitF64> for ClosedUnitF64
impl From<OpenClosedUnitF64> for ClosedUnitF64
source§fn from(value: OpenClosedUnitF64) -> Self
fn from(value: OpenClosedUnitF64) -> Self
Converts to this type from the input type.
source§impl Hash for ClosedUnitF64
impl Hash for ClosedUnitF64
source§impl Mul<ClosedOpenUnitF64> for ClosedUnitF64
impl Mul<ClosedOpenUnitF64> for ClosedUnitF64
§type Output = ClosedOpenUnitF64
type Output = ClosedOpenUnitF64
The resulting type after applying the
*
operator.source§fn mul(self, other: ClosedOpenUnitF64) -> ClosedOpenUnitF64
fn mul(self, other: ClosedOpenUnitF64) -> ClosedOpenUnitF64
Performs the
*
operation. Read moresource§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<ClosedUnitF64> for OffByOneU64
impl Mul<ClosedUnitF64> for OffByOneU64
§type Output = OffByOneU64
type Output = OffByOneU64
The resulting type after applying the
*
operator.source§impl Mul<OpenClosedUnitF64> for ClosedUnitF64
impl Mul<OpenClosedUnitF64> for ClosedUnitF64
§type Output = OpenClosedUnitF64
type Output = OpenClosedUnitF64
The resulting type after applying the
*
operator.source§fn mul(self, other: OpenClosedUnitF64) -> OpenClosedUnitF64
fn mul(self, other: OpenClosedUnitF64) -> OpenClosedUnitF64
Performs the
*
operation. Read moresource§impl Mul for ClosedUnitF64
impl Mul for ClosedUnitF64
source§impl Ord for ClosedUnitF64
impl Ord for ClosedUnitF64
source§impl PartialEq<ClosedUnitF64> for ClosedOpenUnitF64
impl PartialEq<ClosedUnitF64> for ClosedOpenUnitF64
source§fn eq(&self, other: &ClosedUnitF64) -> bool
fn eq(&self, other: &ClosedUnitF64) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<f64> for ClosedUnitF64
impl PartialEq<f64> for ClosedUnitF64
source§impl PartialEq for ClosedUnitF64
impl PartialEq for ClosedUnitF64
source§impl PartialOrd<ClosedUnitF64> for ClosedOpenUnitF64
impl PartialOrd<ClosedUnitF64> for ClosedOpenUnitF64
source§fn partial_cmp(&self, other: &ClosedUnitF64) -> Option<Ordering>
fn partial_cmp(&self, other: &ClosedUnitF64) -> 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 ClosedUnitF64
impl PartialOrd<f64> for ClosedUnitF64
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 ClosedUnitF64
impl PartialOrd for ClosedUnitF64
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 ClosedUnitF64
impl Serialize for ClosedUnitF64
source§impl TryFrom<f64> for ClosedUnitF64
impl TryFrom<f64> for ClosedUnitF64
source§impl TypeLayout for ClosedUnitF64
impl TypeLayout for ClosedUnitF64
§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 ClosedUnitF64
impl Eq for ClosedUnitF64
Auto Trait Implementations§
impl Freeze for ClosedUnitF64
impl RefUnwindSafe for ClosedUnitF64
impl Send for ClosedUnitF64
impl Sync for ClosedUnitF64
impl Unpin for ClosedUnitF64
impl UnwindSafe for ClosedUnitF64
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.