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