pub trait Storable<W: Word>: Sized + Copy {
// Required methods
fn into_word(self) -> W;
fn from_word(word: W) -> Self;
}
Expand description
A trait that defines a bidirectional, lossless conversion between a user-facing
element type T
and its storage representation W
.
This trait is central to FixedVec
’s ability to store various integer types
in a generic bit buffer.
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.