Struct binary_util::types::vari64
source · pub struct vari64(pub i64);
Expand description
A variable length integer type that can be up to 64 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
orByteReader
and use the correspondingread_var_i64
orwrite_var_i64
methods.
Tuple Fields§
§0: i64
Implementations§
Methods from Deref<Target = i64>§
pub const MIN: i64 = -9_223_372_036_854_775_808i64
pub const MAX: i64 = 9_223_372_036_854_775_807i64
pub const BITS: u32 = 64u32
Trait Implementations§
source§impl Ord for vari64
impl Ord for vari64
source§impl PartialEq<vari64> for vari64
impl PartialEq<vari64> for vari64
source§impl PartialOrd<vari64> for vari64
impl PartialOrd<vari64> for vari64
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Writer for vari64
impl Writer for vari64
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 vari64
impl Eq for vari64
impl StructuralEq for vari64
impl StructuralPartialEq for vari64
Auto Trait Implementations§
impl RefUnwindSafe for vari64
impl Send for vari64
impl Sync for vari64
impl Unpin for vari64
impl UnwindSafe for vari64
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