pub trait BitCast: Sized {
// Required methods
fn to_u64(&self) -> u64;
fn from_u64(value: u64) -> Self;
}
Expand description
All encoding and decoding is done via u64. So all types must implement this trait to be able to be encoded and decoded.
Required Methods§
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.