Struct protobuf_native::io::SliceOutputStream
source · pub struct SliceOutputStream<'a> { /* private fields */ }
Expand description
A ZeroCopyOutputStream
specialized for writing to byte slices.
Using this type is more efficient than using a WriterStream
when the
underlying writer is a type that exposes a simple mutable byte slice.
Implementations§
source§impl<'a> SliceOutputStream<'a>
impl<'a> SliceOutputStream<'a>
Trait Implementations§
source§impl<'a> Drop for SliceOutputStream<'a>
impl<'a> Drop for SliceOutputStream<'a>
source§impl<'a> ZeroCopyOutputStream for SliceOutputStream<'a>
impl<'a> ZeroCopyOutputStream for SliceOutputStream<'a>
source§unsafe fn next(
self: Pin<&mut Self>,
) -> Result<&mut [MaybeUninit<u8>], OperationFailedError>
unsafe fn next( self: Pin<&mut Self>, ) -> Result<&mut [MaybeUninit<u8>], OperationFailedError>
Obtains a buffer into which data can be written. Read more
source§fn byte_count(&self) -> i64
fn byte_count(&self) -> i64
Returns the total number of bytes written since this object was created.
Auto Trait Implementations§
impl<'a> Freeze for SliceOutputStream<'a>
impl<'a> RefUnwindSafe for SliceOutputStream<'a>
impl<'a> Send for SliceOutputStream<'a>
impl<'a> Sync for SliceOutputStream<'a>
impl<'a> !Unpin for SliceOutputStream<'a>
impl<'a> UnwindSafe for SliceOutputStream<'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