pub struct SliceReader<'storage> { /* private fields */ }
Expand description

A reader type for &[u8] slices. Implements both Reader and BorrowReader, and thus can be used for borrowed data.

Implementations

Constructs a slice reader

Trait Implementations

Read exactly length bytes and return a slice to this data. If not enough bytes could be read, an error should be returned. Read more
Fill the given bytes argument with values. Exactly the length of the given slice must be filled, or else an error must be returned.
If this reader wraps a buffer of any kind, this function lets callers access contents of the buffer without passing data through a buffer first. Read more
If an implementation of peek_read is provided, an implementation of this function must be provided so that subsequent reads or peek-reads do not return the same bytes Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.