pub struct VarInt(/* private fields */);
Expand description
An integer less than 2^62
Values of this type are suitable for encoding as QUIC variable-length integer.
Implementations§
source§impl VarInt
impl VarInt
sourcepub const unsafe fn from_u64_unchecked(x: u64) -> VarInt
pub const unsafe fn from_u64_unchecked(x: u64) -> VarInt
sourcepub const fn into_inner(self) -> u64
pub const fn into_inner(self) -> u64
Extract the integer value
Trait Implementations§
source§impl Ord for VarInt
impl Ord for VarInt
source§impl PartialEq for VarInt
impl PartialEq for VarInt
source§impl PartialOrd for VarInt
impl PartialOrd for VarInt
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 TryFrom<u128> for VarInt
impl TryFrom<u128> for VarInt
§type Error = VarIntBoundsExceeded
type Error = VarIntBoundsExceeded
The type returned in the event of a conversion error.
source§impl TryFrom<u64> for VarInt
impl TryFrom<u64> for VarInt
§type Error = VarIntBoundsExceeded
type Error = VarIntBoundsExceeded
The type returned in the event of a conversion error.
source§impl TryFrom<usize> for VarInt
impl TryFrom<usize> for VarInt
§type Error = VarIntBoundsExceeded
type Error = VarIntBoundsExceeded
The type returned in the event of a conversion error.
impl Copy for VarInt
impl Eq 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 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