pub struct VecOutputTarget<'a> { /* private fields */ }Expand description
A wrapper around a Vec<u8> that implements OutputTarget.
The implementation will automatically grow the Vec as needed.
Trait Implementations§
Source§impl<'a> Debug for VecOutputTarget<'a>
impl<'a> Debug for VecOutputTarget<'a>
Source§impl OutputTarget for VecOutputTarget<'_>
impl OutputTarget for VecOutputTarget<'_>
Source§fn remaining(&self) -> usize
fn remaining(&self) -> usize
Returns the number of unwritten bytes currently remaining in the target. Read more
Source§fn write_byte(&mut self, byte: u8) -> Result<()>
fn write_byte(&mut self, byte: u8) -> Result<()>
Attempts to write the provided byte into this target.
Source§fn write_bytes_exact(&mut self, bytes: &[u8]) -> Result<()>
fn write_bytes_exact(&mut self, bytes: &[u8]) -> Result<()>
Attempts to write the provided bytes into this target. Read more
Source§fn write_bytes_into_reserved_exact(
&mut self,
reservation: &mut Reservation,
bytes: &[u8],
) -> Result<()>
fn write_bytes_into_reserved_exact( &mut self, reservation: &mut Reservation, bytes: &[u8], ) -> Result<()>
Attempts to write the provided bytes into a reserved chunk of memory within this target. Read more
Source§fn reserve_space(&mut self, count: usize) -> Result<Reservation>
fn reserve_space(&mut self, count: usize) -> Result<Reservation>
Reserves a chunk of memory in the target that can be written to later, and advances past it. Read more
Auto Trait Implementations§
impl<'a> Freeze for VecOutputTarget<'a>
impl<'a> RefUnwindSafe for VecOutputTarget<'a>
impl<'a> Send for VecOutputTarget<'a>
impl<'a> Sync for VecOutputTarget<'a>
impl<'a> Unpin for VecOutputTarget<'a>
impl<'a> UnsafeUnpin for VecOutputTarget<'a>
impl<'a> !UnwindSafe for VecOutputTarget<'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