pub struct Decoder<'a> { /* private fields */ }Available on crate feature
cbor only.Implementations§
Source§impl<'a> Decoder<'a>
impl<'a> Decoder<'a>
pub fn new(data: &'a [u8]) -> Self
pub fn finish(self) -> Result<(), Error>
pub fn decode_uint(&mut self) -> Result<u64, Error>
pub fn decode_int(&mut self) -> Result<i64, Error>
pub fn decode_bytes(&mut self) -> Result<Vec<u8>, Error>
pub fn decode_bytes_fixed<const N: usize>(&mut self) -> Result<[u8; N], Error>
pub fn decode_text(&mut self) -> Result<String, Error>
pub fn decode_array_header(&mut self) -> Result<u64, Error>
pub fn decode_map_header(&mut self) -> Result<u64, Error>
pub fn decode_bool(&mut self) -> Result<bool, Error>
pub fn decode_null(&mut self) -> Result<(), Error>
pub fn peek_null(&self) -> bool
Trait Implementations§
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> UnwindSafe for Decoder<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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