Struct protobuf_native::io::SliceInputStream
source · pub struct SliceInputStream<'a> { /* private fields */ }
Expand description
A ZeroCopyInputStream
specialized for reading from byte slices.
Using this type is more efficient than using a ReaderStream
when the
underlying reader is a type that exposes a simple byte slice.
Implementations§
source§impl<'a> SliceInputStream<'a>
impl<'a> SliceInputStream<'a>
Trait Implementations§
source§impl<'a> Drop for SliceInputStream<'a>
impl<'a> Drop for SliceInputStream<'a>
source§impl<'a> ZeroCopyInputStream for SliceInputStream<'a>
impl<'a> ZeroCopyInputStream for SliceInputStream<'a>
source§fn next(self: Pin<&mut Self>) -> Result<&[u8], OperationFailedError>
fn next(self: Pin<&mut Self>) -> Result<&[u8], OperationFailedError>
Obtains a chunk of data from the stream. Read more
source§fn skip(self: Pin<&mut Self>, count: usize) -> Result<(), OperationFailedError>
fn skip(self: Pin<&mut Self>, count: usize) -> Result<(), OperationFailedError>
Skips
count
bytes. Read moresource§fn byte_count(&self) -> i64
fn byte_count(&self) -> i64
Returns the total number of bytes read since this stream was created.
Auto Trait Implementations§
impl<'a> Freeze for SliceInputStream<'a>
impl<'a> RefUnwindSafe for SliceInputStream<'a>
impl<'a> Send for SliceInputStream<'a>
impl<'a> Sync for SliceInputStream<'a>
impl<'a> !Unpin for SliceInputStream<'a>
impl<'a> UnwindSafe for SliceInputStream<'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