pub struct SliceWriter<'a> { /* private fields */ }
Implementations§
source§impl<'a> SliceWriter<'a>
impl<'a> SliceWriter<'a>
sourcepub fn new(slice: &'a mut [u8]) -> SliceWriter<'a>
pub fn new(slice: &'a mut [u8]) -> SliceWriter<'a>
Wraps a mutable slice so it can be used as a Writer
.
sourcepub fn bytes_written(&self) -> usize
pub fn bytes_written(&self) -> usize
Returns the number of bytes written to the underlying slice.
sourcepub fn into_inner(self) -> &'a mut [u8]
pub fn into_inner(self) -> &'a mut [u8]
Returns the underlying slice.
Trait Implementations§
source§impl<'a> Debug for SliceWriter<'a>
impl<'a> Debug for SliceWriter<'a>
Auto Trait Implementations§
impl<'a> Freeze for SliceWriter<'a>
impl<'a> RefUnwindSafe for SliceWriter<'a>
impl<'a> Send for SliceWriter<'a>
impl<'a> Sync for SliceWriter<'a>
impl<'a> Unpin for SliceWriter<'a>
impl<'a> !UnwindSafe for SliceWriter<'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