pub trait VBRInteger: Integer {
// Required methods
fn read_vbr<const FIELD_SIZE: u32, R>(reader: &mut R) -> Result<Self>
where R: BitRead + ?Sized,
Self: Sized;
fn write_vbr<const FIELD_SIZE: u32, W: BitWrite + ?Sized>(
self,
writer: &mut W,
) -> Result<()>;
}
Expand description
This trait is for integer types which can be read or written to a bit stream as variable-width integers.
It unifies signed and unsigned integer types by delegating reads and write to the signed and unsigned vbr reading and writing methods as appropriate.
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.