pub struct OutputSlice<'a> {
pub obuf: &'a mut [u8],
pub pos: usize,
}Expand description
A non-allocating append sink backed by a caller-provided slice.
Its logical view is the prefix written so far (given by pos).
Fields§
§obuf: &'a mut [u8]§pos: usizeImplementations§
Trait Implementations§
Source§impl OutputBuf for OutputSlice<'_>
impl OutputBuf for OutputSlice<'_>
Source§fn write_byte(&mut self, byte: u8)
fn write_byte(&mut self, byte: u8)
Appends one byte to the logical output.
Source§fn write_array<const N: usize>(&mut self, bytes: &[u8; N])
fn write_array<const N: usize>(&mut self, bytes: &[u8; N])
Appends a fixed-width group of bytes. Read more
Source§fn write_bytes(&mut self, bytes: &[u8])
fn write_bytes(&mut self, bytes: &[u8])
Appends all bytes in
bytes to the logical output.Auto Trait Implementations§
impl<'a> !UnwindSafe for OutputSlice<'a>
impl<'a> Freeze for OutputSlice<'a>
impl<'a> RefUnwindSafe for OutputSlice<'a>
impl<'a> Send for OutputSlice<'a>
impl<'a> Sync for OutputSlice<'a>
impl<'a> Unpin for OutputSlice<'a>
impl<'a> UnsafeUnpin for OutputSlice<'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