pub struct VarInt(pub i32);Expand description
A variable-length integer.
Tuple Fields§
§0: i32Implementations§
Source§impl VarInt
impl VarInt
Sourcepub const fn written_size(val: i32) -> usize
pub const fn written_size(val: i32) -> usize
Returns the exact number of bytes this VarInt will write when
WriteTo::write is called, assuming no error occurs.
Sourcepub fn set_in_front(self, vec: &mut FrontVec, varint_size: usize)
pub fn set_in_front(self, vec: &mut FrontVec, varint_size: usize)
Trait Implementations§
impl Copy for VarInt
impl Eq for VarInt
Source§impl Ord for VarInt
impl Ord for VarInt
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for VarInt
impl PartialOrd for VarInt
impl StructuralPartialEq for VarInt
Auto Trait Implementations§
impl Freeze for VarInt
impl RefUnwindSafe for VarInt
impl Send for VarInt
impl Sync for VarInt
impl Unpin for VarInt
impl UnsafeUnpin for VarInt
impl UnwindSafe for VarInt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.