pub trait ALPRDFloat:
Sealed
+ Float
+ Copy
+ NativePType {
type UINT: NativePType + PrimInt + One + Copy;
const BITS: usize = _;
// Required methods
fn from_bits(bits: Self::UINT) -> Self;
fn to_bits(value: Self) -> Self::UINT;
fn to_u16(bits: Self::UINT) -> u16;
fn from_u16(value: u16) -> Self::UINT;
}Expand description
Main trait for ALP-RD encodable floating point numbers.
Like the paper, we limit this to the IEEE7 754 single-precision (f32) and double-precision
(f64) floating point types.
Provided Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn from_bits(bits: Self::UINT) -> Self
fn from_bits(bits: Self::UINT) -> Self
Bit-wise transmute from the unsigned integer type to the floating-point type.
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.