pub trait ToCanonicalBits: Encoding {
// Required method
fn to_canonical_bits(self) -> u64;
}Expand description
Converts floating-point values into a canonicalized form.
Required Methods§
Sourcefn to_canonical_bits(self) -> u64
fn to_canonical_bits(self) -> u64
Conversion to a canonical representation.
Unlike the to_bits function provided by f32 and f64, this function
returns bits in a fix-sized vector (u64) and collapses representations
for real numbers, infinities, and NaNs into a canonical form such that
every semantic value has a unique representation as canonical bits.
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.