pub struct Decoder<'a> { /* private fields */ }Expand description
MessagePack decoder reading from a byte slice.
Implementations§
Source§impl<'a> Decoder<'a>
impl<'a> Decoder<'a>
Sourcepub fn new(input: &'a [u8]) -> Self
pub fn new(input: &'a [u8]) -> Self
Creates a new decoder for the given byte slice with default configuration.
Sourcepub fn with_config(input: &'a [u8], config: DecoderConfig) -> Self
pub fn with_config(input: &'a [u8], config: DecoderConfig) -> Self
Creates a new decoder for the given byte slice with custom configuration.
Sourcepub fn decode_value(&mut self) -> Result<Value, MsgPackError>
pub fn decode_value(&mut self) -> Result<Value, MsgPackError>
Decodes the next value in the stream into a universal Value.
Auto Trait Implementations§
impl<'a> Freeze for Decoder<'a>
impl<'a> RefUnwindSafe for Decoder<'a>
impl<'a> Send for Decoder<'a>
impl<'a> Sync for Decoder<'a>
impl<'a> Unpin for Decoder<'a>
impl<'a> UnsafeUnpin for Decoder<'a>
impl<'a> UnwindSafe for Decoder<'a>
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