Struct serde_cbor::de::SliceReadFixed [−][src]
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
impl<'a, 'b> SliceReadFixed<'a, 'b>
[src]
pub fn new(slice: &'a [u8], scratch: &'b mut [u8]) -> SliceReadFixed<'a, 'b>
[src]
Creates a CBOR input source to read from a slice of bytes, backed by a scratch buffer.
Trait Implementations
impl<'a, 'b> Debug for SliceReadFixed<'a, 'b>
[src]
impl<'a, 'b> Read<'a> for SliceReadFixed<'a, 'b>
[src]
fn next(&mut self) -> Result<Option<u8>>
[src]
fn peek(&mut self) -> Result<Option<u8>>
[src]
fn clear_buffer(&mut self)
[src]
fn read_to_buffer(&mut self, n: usize) -> Result<()>
[src]
fn read<'c>(&'c mut self, n: usize) -> Result<EitherLifetime<'c, 'a>>
[src]
fn take_buffer<'c>(&'c mut self) -> EitherLifetime<'c, 'a>
[src]
fn read_into(&mut self, buf: &mut [u8]) -> Result<()>
[src]
fn discard(&mut self)
[src]
fn offset(&self) -> u64
[src]
Auto Trait Implementations
impl<'a, 'b> RefUnwindSafe for SliceReadFixed<'a, 'b>
impl<'a, 'b> Send for SliceReadFixed<'a, 'b>
impl<'a, 'b> Sync for SliceReadFixed<'a, 'b>
impl<'a, 'b> Unpin for SliceReadFixed<'a, 'b>
impl<'a, 'b> !UnwindSafe for SliceReadFixed<'a, 'b>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,