Struct NonZeroVbi
pub struct NonZeroVbi(NonZeroU32);Expand description
Non-zero Variable Byte Integer.
Tuple Fields§
§0: NonZeroU32Implementations§
§impl NonZeroVbi
impl NonZeroVbi
pub const MIN: Self
pub const MIN: Self
The minimum non-zero value (a.k.a. 1).
pub const MAX: Self
pub const MAX: Self
The maximum value.
pub const MAX_USIZE: usize = 268_435_455usize
pub const MAX_USIZE: usize = 268_435_455usize
The maximum usize value that can be represented as a non-zero VBI.
pub const fn new(value: u32) -> Option<Self>
pub const fn new(value: u32) -> Option<Self>
Creates a new non-zero VBI, returning None if the value is zero.
pub const fn from_vbi(value: Vbi) -> Option<Self>
pub const fn from_vbi(value: Vbi) -> Option<Self>
Creates a new non-zero VBI, returning None if the value is zero.
pub const fn encoded_len(self) -> usize
pub const fn encoded_len(self) -> usize
Returns the number of bytes needed to encode this non-zero VBI.
Trait Implementations§
§impl Clone for NonZeroVbi
impl Clone for NonZeroVbi
§fn clone(&self) -> NonZeroVbi
fn clone(&self) -> NonZeroVbi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for NonZeroVbi
impl Debug for NonZeroVbi
§impl Hash for NonZeroVbi
impl Hash for NonZeroVbi
§impl Ord for NonZeroVbi
impl Ord for NonZeroVbi
§impl PartialEq for NonZeroVbi
impl PartialEq for NonZeroVbi
§impl PartialOrd for NonZeroVbi
impl PartialOrd for NonZeroVbi
impl Copy for NonZeroVbi
impl Eq for NonZeroVbi
impl StructuralPartialEq for NonZeroVbi
Auto Trait Implementations§
impl Freeze for NonZeroVbi
impl RefUnwindSafe for NonZeroVbi
impl Send for NonZeroVbi
impl Sync for NonZeroVbi
impl Unpin for NonZeroVbi
impl UnwindSafe for NonZeroVbi
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