Struct serde_cbor::de::SliceReadFixed
source · pub struct SliceReadFixed<'a, 'b> { /* private fields */ }
Expand description
A CBOR input source that reads from a slice of bytes using a fixed size scratch buffer.
SliceRead
and MutSliceRead
are usually
preferred over this, as they can handle indefinite length items.
Implementations§
source§impl<'a, 'b> SliceReadFixed<'a, 'b>
impl<'a, 'b> SliceReadFixed<'a, 'b>
sourcepub fn new(slice: &'a [u8], scratch: &'b mut [u8]) -> SliceReadFixed<'a, 'b>
pub fn new(slice: &'a [u8], scratch: &'b mut [u8]) -> SliceReadFixed<'a, 'b>
Creates a CBOR input source to read from a slice of bytes, backed by a scratch buffer.