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
,u64
i8
,i16
,i32
,i64
f32
,f64
String
(throughStringConverter
)Option<T>
whereT
can be storedResult<T, F>
whereT
andF
can be stored[T; 0]
through[T; 32]
whereT
can 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.