pub struct IoSlices<'a> {
pub slots: Vec<SliceSlot<'a>>,
}Expand description
A collection of vectored I/O slices used for efficient streaming writes.
Internally maintains a list of SliceSlots, which can be borrowed or owned.
Provides utilities to build and write the combined data.
Fields§
§slots: Vec<SliceSlot<'a>>Internal list of slices to be written.
Implementations§
Source§impl<'a> IoSlices<'a>
impl<'a> IoSlices<'a>
Sourcepub fn add_buffered(&mut self, buf: Vec<u8>)
pub fn add_buffered(&mut self, buf: Vec<u8>)
Sourcepub fn get(&self) -> Vec<IoSlice<'_>>
pub fn get(&self) -> Vec<IoSlice<'_>>
Converts all internal slots into a Vec<IoSlice> for writing.
This method is non-destructive and safe to call multiple times.
§Returns
A vector of std::io::IoSlice values ready for write_vectored.
Sourcepub fn append(&mut self, another: IoSlices<'a>)
pub fn append(&mut self, another: IoSlices<'a>)
Appends another IoSlices into this one, consuming the other buffer.
§Arguments
another– AnotherIoSlicesinstance to merge into this one.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for IoSlices<'a>
impl<'a> RefUnwindSafe for IoSlices<'a>
impl<'a> Send for IoSlices<'a>
impl<'a> Sync for IoSlices<'a>
impl<'a> Unpin for IoSlices<'a>
impl<'a> UnwindSafe for IoSlices<'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