pub struct Stage { /* private fields */ }Expand description
An encoding stage used for vlue compression.
Implementations§
Source§impl Stage
impl Stage
Sourcepub const fn new(
prefix: u8,
prefix_bits: u8,
ordinal_bits: u8,
ordinal_min: i64,
) -> Stage
pub const fn new( prefix: u8, prefix_bits: u8, ordinal_bits: u8, ordinal_min: i64, ) -> Stage
Constructs a stage with the given prefix and value range.
Sourcepub const fn prefix_bits(&self) -> u8
pub const fn prefix_bits(&self) -> u8
Returns the number of bits used to encode the prefix.
Sourcepub const fn ordinal_min(&self) -> i64
pub const fn ordinal_min(&self) -> i64
Returns the lowest value which can be encoded by the stage.
Sourcepub const fn ordinal_max(&self) -> i64
pub const fn ordinal_max(&self) -> i64
Returns the upper value which can be encoded by the stage.
Sourcepub const fn ordinal_bits(&self) -> u8
pub const fn ordinal_bits(&self) -> u8
Returns the number of bits used to encode the value part.
Trait Implementations§
impl Eq for Stage
impl StructuralPartialEq for Stage
Auto Trait Implementations§
impl Freeze for Stage
impl RefUnwindSafe for Stage
impl Send for Stage
impl Sync for Stage
impl Unpin for Stage
impl UnwindSafe for Stage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more