pub trait BitStore: Sized {
// Required methods
fn read_from<R: BitRead>(reader: &mut R) -> Result<Self>;
fn write_to<W: BitWrite>(&self, writer: &mut W) -> Result<()>;
}Expand description
A trait for storing a value directly
§Derive
BitStore can be derived using the bit manager derive crate.
§Storage Primitives
bool,u8(directly implemented)u16,u32,u64i8,i16,i32,i64f32,f64String(throughStringConverter)Option<T>whereTcan be storedResult<T, F>whereTandFcan be stored[T; 0]through[T; 32]whereTcan be stored()(the unit type) and all tuples with 2 through 26 storable values
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.