pub struct WsBuffer<'ws, Item, Suffix, Output> { /* private fields */ }Expand description
The free region of the workspace that functions as a “resizable” vector, up to the end of the workspace.
The buffer must be finalized using finish() to avoid being reclaimed when dropped.
Implementations§
Source§impl<Item, Suffix, Output> WsBuffer<'_, Item, Suffix, Output>
impl<Item, Suffix, Output> WsBuffer<'_, Item, Suffix, Output>
Source§impl WsBuffer<'_, u8, u8, VCL_STRING>
impl WsBuffer<'_, u8, u8, VCL_STRING>
Sourcepub fn finish(self) -> VCL_STRING
pub fn finish(self) -> VCL_STRING
Finish writing to the WsBuffer, returning the allocated VCL_STRING.
Trait Implementations§
Source§impl<'ws, Item: Debug, Suffix: Debug, Output: Debug> Debug for WsBuffer<'ws, Item, Suffix, Output>
impl<'ws, Item: Debug, Suffix: Debug, Output: Debug> Debug for WsBuffer<'ws, Item, Suffix, Output>
Source§impl<Output, Suffix> Write for WsBuffer<'_, u8, Suffix, Output>
impl<Output, Suffix> Write for WsBuffer<'_, u8, Suffix, Output>
Source§fn write(&mut self, data: &[u8]) -> Result<usize>
fn write(&mut self, data: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<'ws, Item, Suffix, Output> Freeze for WsBuffer<'ws, Item, Suffix, Output>
impl<'ws, Item, Suffix, Output> RefUnwindSafe for WsBuffer<'ws, Item, Suffix, Output>
impl<'ws, Item, Suffix, Output> !Send for WsBuffer<'ws, Item, Suffix, Output>
impl<'ws, Item, Suffix, Output> !Sync for WsBuffer<'ws, Item, Suffix, Output>
impl<'ws, Item, Suffix, Output> Unpin for WsBuffer<'ws, Item, Suffix, Output>
impl<'ws, Item, Suffix, Output> !UnwindSafe for WsBuffer<'ws, Item, Suffix, Output>
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