pub struct UInt<U: UPrim>(pub U);
Expand description
An ergonomic wrapper to allow for encoding and decoding of primitive unsigned integers as varints rather than the default fixed-width integers.
Tuple Fields§
§0: U
Trait Implementations§
Source§impl<U: UPrim> EncodeSize for UInt<U>
impl<U: UPrim> EncodeSize for UInt<U>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl<U: Ord + UPrim> Ord for UInt<U>
impl<U: Ord + UPrim> Ord for UInt<U>
Source§impl<U: PartialOrd + UPrim> PartialOrd for UInt<U>
impl<U: PartialOrd + UPrim> PartialOrd for UInt<U>
Source§impl<U: UPrim> Read for UInt<U>
impl<U: UPrim> Read for UInt<U>
impl<U: Eq + UPrim> Eq for UInt<U>
impl<U: UPrim> StructuralPartialEq for UInt<U>
Auto Trait Implementations§
impl<U> Freeze for UInt<U>where
U: Freeze,
impl<U> RefUnwindSafe for UInt<U>where
U: RefUnwindSafe,
impl<U> Send for UInt<U>where
U: Send,
impl<U> Sync for UInt<U>where
U: Sync,
impl<U> Unpin for UInt<U>where
U: Unpin,
impl<U> UnwindSafe for UInt<U>where
U: UnwindSafe,
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