pub struct Float64(/* private fields */);Expand description
Finite canonical f64 atom.
Implementations§
Source§impl Float64
impl Float64
Sourcepub fn try_new(value: f64) -> Option<Float64>
pub fn try_new(value: f64) -> Option<Float64>
Construct a finite float and normalize negative zero.
Sourcepub const fn to_be_bytes(&self) -> [u8; 8]
pub const fn to_be_bytes(&self) -> [u8; 8]
Return the stable big-endian IEEE-754 representation.
Sourcepub fn try_from_bytes(bytes: &[u8]) -> Result<Float64, Float64DecodeError>
pub fn try_from_bytes(bytes: &[u8]) -> Result<Float64, Float64DecodeError>
Decode one stable big-endian IEEE-754 representation.
§Errors
Returns a typed error for the wrong byte length or a non-finite value.
Trait Implementations§
Source§impl CandidType for Float64
impl CandidType for Float64
impl Copy for Float64
Source§impl<'de> Deserialize<'de> for Float64
impl<'de> Deserialize<'de> for Float64
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Float64, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Float64, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Float64
Source§impl NormalizeAuto for Float64
impl NormalizeAuto for Float64
fn normalize_self(&mut self, _ctx: &mut dyn VisitorContext)
Source§impl NormalizeCustom for Float64
impl NormalizeCustom for Float64
fn normalize_custom(&mut self, _ctx: &mut dyn VisitorContext)
Source§impl NumericValue for Float64
impl NumericValue for Float64
Source§impl Ord for Float64
impl Ord for Float64
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Float64
impl PartialOrd for Float64
Source§impl Serialize for Float64
impl Serialize for Float64
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl ValidateAuto for Float64
impl ValidateAuto for Float64
fn validate_self(&self, _ctx: &mut dyn VisitorContext)
Source§impl ValidateCustom for Float64
impl ValidateCustom for Float64
fn validate_custom(&self, _ctx: &mut dyn VisitorContext)
Auto Trait Implementations§
impl Freeze for Float64
impl RefUnwindSafe for Float64
impl Send for Float64
impl Sync for Float64
impl Unpin for Float64
impl UnsafeUnpin for Float64
impl UnwindSafe for Float64
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> CustomError for T
impl<T> CustomError for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.