pub struct Decoder<I: InputSource> { /* private fields */ }Expand description
TODO
Implementations§
Source§impl<I: InputSource> Decoder<I>
impl<I: InputSource> Decoder<I>
Sourcepub fn decode_varint<T: TryFrom<i64>>(&mut self) -> Result<T>
pub fn decode_varint<T: TryFrom<i64>>(&mut self) -> Result<T>
Reads between 1 and 8 bytes from the buffer and decodes a single signed integer from them. This integer must of been encoded in the variable length ‘varint’ format.
Sourcepub fn decode_varuint<T: TryFrom<u64>>(&mut self) -> Result<T>
pub fn decode_varuint<T: TryFrom<u64>>(&mut self) -> Result<T>
Reads between 1 and 8 bytes from the buffer and decodes a single unsigned integer from them. This integer must of been encoded in the variable length ‘varuint’ format.
Sourcepub fn decode_size(&mut self) -> Result<usize>
pub fn decode_size(&mut self) -> Result<usize>
An alias for [decode_varuint] to increase readability.
Sourcepub fn skip_tagged_fields(&mut self) -> Result<()>
pub fn skip_tagged_fields(&mut self) -> Result<()>
Skips any remaining tagged fields.
Source§impl<I: InputSource> Decoder<I>
impl<I: InputSource> Decoder<I>
Trait Implementations§
Source§impl<I: InputSource> Deref for Decoder<I>
impl<I: InputSource> Deref for Decoder<I>
Source§impl<I: InputSource> DerefMut for Decoder<I>
impl<I: InputSource> DerefMut for Decoder<I>
Source§impl<'a, T> From<T> for Decoder<SliceInputSource<'a>>where
T: Into<SliceInputSource<'a>>,
impl<'a, T> From<T> for Decoder<SliceInputSource<'a>>where
T: Into<SliceInputSource<'a>>,
Auto Trait Implementations§
impl<I> Freeze for Decoder<I>where
I: Freeze,
impl<I> RefUnwindSafe for Decoder<I>where
I: RefUnwindSafe,
impl<I> Send for Decoder<I>where
I: Send,
impl<I> Sync for Decoder<I>where
I: Sync,
impl<I> Unpin for Decoder<I>where
I: Unpin,
impl<I> UnsafeUnpin for Decoder<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for Decoder<I>where
I: 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