pub struct VarintDecoder;Expand description
Decoder for VarintEncoder-encoded data.
Implementations§
Source§impl VarintDecoder
impl VarintDecoder
Sourcepub fn decode_i64(data: &[u8]) -> Result<Vec<i64>>
pub fn decode_i64(data: &[u8]) -> Result<Vec<i64>>
Decode a varint-encoded byte buffer back to i64 values.
§Errors
Returns EncodingError::CorruptData if the data is malformed.
Sourcepub fn decode_u64(data: &[u8]) -> Result<Vec<u64>>
pub fn decode_u64(data: &[u8]) -> Result<Vec<u64>>
Decode a varint-encoded byte buffer back to u64 values.
§Errors
Returns EncodingError::CorruptData if the data is malformed.
Trait Implementations§
Source§impl Clone for VarintDecoder
impl Clone for VarintDecoder
Source§fn clone(&self) -> VarintDecoder
fn clone(&self) -> VarintDecoder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VarintDecoder
Auto Trait Implementations§
impl Freeze for VarintDecoder
impl RefUnwindSafe for VarintDecoder
impl Send for VarintDecoder
impl Sync for VarintDecoder
impl Unpin for VarintDecoder
impl UnsafeUnpin for VarintDecoder
impl UnwindSafe for VarintDecoder
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