Struct relay_metrics::FiniteF64
source · pub struct FiniteF64(/* private fields */);
Expand description
A finite 64-bit floating point type.
This is a restricted version of f64
that does not allow NaN or infinity.
Implementations§
source§impl FiniteF64
impl FiniteF64
sourcepub const unsafe fn new_unchecked(value: f64) -> Self
pub const unsafe fn new_unchecked(value: f64) -> Self
Creates a finite float without checking whether the value is finte. This results in undefined behavior if the value is non-finite.
§Safety
The value must not be NaN or infinite.
sourcepub fn saturating_add(self, other: Self) -> Self
pub fn saturating_add(self, other: Self) -> Self
Adds two numbers, saturating at the maximum and minimum representable values.
sourcepub fn saturating_sub(self, other: Self) -> Self
pub fn saturating_sub(self, other: Self) -> Self
Adds two numbers, saturating at the maximum and minimum representable values.
sourcepub fn saturating_mul(self, other: Self) -> Self
pub fn saturating_mul(self, other: Self) -> Self
Multiplies two numbers, saturating at the maximum and minimum representable values.
Trait Implementations§
source§impl<'de> Deserialize<'de> for FiniteF64
impl<'de> Deserialize<'de> for FiniteF64
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 Ord for FiniteF64
impl Ord for FiniteF64
source§impl PartialEq for FiniteF64
impl PartialEq for FiniteF64
source§impl PartialOrd for FiniteF64
impl PartialOrd for FiniteF64
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 moreimpl Copy for FiniteF64
impl Eq for FiniteF64
impl StructuralPartialEq for FiniteF64
Auto Trait Implementations§
impl RefUnwindSafe for FiniteF64
impl Send for FiniteF64
impl Sync for FiniteF64
impl Unpin for FiniteF64
impl UnwindSafe for FiniteF64
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.