ToCanonical

Trait ToCanonical 

Source
pub trait ToCanonical: BaseEncoding + Copy {
    type Canonical: Copy + Eq + Hash;

    // Required method
    fn to_canonical(self) -> Self::Canonical;
}
Expand description

Converts IEEE 754 floating-point values to a canonicalized form.

Required Associated Types§

Required Methods§

Source

fn to_canonical(self) -> Self::Canonical

Conversion to a canonical representation.

This function collapses real numbers, zeroes, infinities, and NaNs into a canonical form such that every semantic value has a unique representation with an equivalence relation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§