pub trait BitConvert<T>: Sized {
// Required methods
fn read_value_from<R: BitRead>(&self, reader: &mut R) -> Result<T>;
fn write_value_to<W: BitWrite>(
&self,
value: &T,
writer: &mut W,
) -> Result<()>;
}
Expand description
A trait for a converter that allows the reading and writing of types though a converter
Required Methods§
Sourcefn read_value_from<R: BitRead>(&self, reader: &mut R) -> Result<T>
fn read_value_from<R: BitRead>(&self, reader: &mut R) -> Result<T>
Reads a value from the given reader.
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.