pub struct vari32(pub i32);
Expand description
A variable length integer type that can be up to 32 bits.
This is a helper type for deriving the BinaryIo
trait.
You should not use this type directly, if you are reading or writing
a variable length integer, use the ByteWriter
or ByteReader
and use
the corresponding read_var_i32
or write_var_i32
methods.
Tuple Fields§
§0: i32
Implementations§
Trait Implementations§
Source§impl Ord for vari32
impl Ord for vari32
Source§impl PartialOrd for vari32
impl PartialOrd for vari32
Source§impl Writer for vari32
impl Writer for vari32
Source§fn write_to_bytes(&self) -> Result<ByteWriter, Error>
fn write_to_bytes(&self) -> Result<ByteWriter, Error>
This is a utility function to write
Self
to a ByteWriter
without
needing to create a ByteWriter
first.impl Copy for vari32
impl Eq for vari32
impl StructuralPartialEq for vari32
Auto Trait Implementations§
impl Freeze for vari32
impl RefUnwindSafe for vari32
impl Send for vari32
impl Sync for vari32
impl Unpin for vari32
impl UnwindSafe for vari32
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