pub struct VectoredBufIter<T> { /* private fields */ }Expand description
An owned iterator over a vectored buffer.
Normally one would use IoVectoredBuf::owned_iter to create this
iterator.
Implementations§
Source§impl<T> VectoredBufIter<T>
impl<T> VectoredBufIter<T>
Sourcepub fn next(self) -> Result<Self, T>
pub fn next(self) -> Result<Self, T>
Create a new VectoredBufIter from an indexable container. If the
container is empty, return the buffer back in Err(T).
Trait Implementations§
Source§impl<T> IntoInner for VectoredBufIter<T>
impl<T> IntoInner for VectoredBufIter<T>
Source§impl<T: IoVectoredBuf> IoBuf for VectoredBufIter<T>
impl<T: IoVectoredBuf> IoBuf for VectoredBufIter<T>
Source§impl<T: IoVectoredBufMut> IoBufMut for VectoredBufIter<T>
impl<T: IoVectoredBufMut> IoBufMut for VectoredBufIter<T>
Source§fn as_uninit(&mut self) -> &mut [MaybeUninit<u8>]
fn as_uninit(&mut self) -> &mut [MaybeUninit<u8>]
Get the full mutable slice of the buffer, including both initialized
and uninitialized bytes.
Source§fn buf_capacity(&mut self) -> usize
fn buf_capacity(&mut self) -> usize
Total capacity of the buffer, including both initialized and
uninitialized bytes.
Source§fn buf_mut_ptr(&mut self) -> *mut MaybeUninit<u8>
fn buf_mut_ptr(&mut self) -> *mut MaybeUninit<u8>
Get the raw mutable pointer to the buffer.
Source§fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Get the mutable slice of initialized bytes. The content is the same as
IoBuf::as_init, but mutable.Source§fn extend_from_slice(&mut self, src: &[u8]) -> Result<(), ReserveError>
fn extend_from_slice(&mut self, src: &[u8]) -> Result<(), ReserveError>
Extend the buffer by copying bytes from
src. Read moreSource§fn copy_within<R>(&mut self, src: R, dest: usize)where
R: RangeBounds<usize>,
fn copy_within<R>(&mut self, src: R, dest: usize)where
R: RangeBounds<usize>,
Like
slice::copy_within, copy a range of bytes within the buffer to
another location in the same buffer. This will count in both initialized
and uninitialized bytes. Read moreSource§fn reserve(&mut self, len: usize) -> Result<(), ReserveError>
fn reserve(&mut self, len: usize) -> Result<(), ReserveError>
Reserve additional capacity for the buffer. Read more
Source§fn reserve_exact(&mut self, len: usize) -> Result<(), ReserveExactError>
fn reserve_exact(&mut self, len: usize) -> Result<(), ReserveExactError>
Reserve exactly
len additional capacity for the buffer. Read moreSource§fn into_writer(self) -> Writer<Self> ⓘwhere
Self: Sized,
fn into_writer(self) -> Writer<Self> ⓘwhere
Self: Sized,
Create a
Writer from this buffer, which implements
std::io::Write.Source§impl<T: IoVectoredBuf + SetLen> SetLen for VectoredBufIter<T>
impl<T: IoVectoredBuf + SetLen> SetLen for VectoredBufIter<T>
Auto Trait Implementations§
impl<T> Freeze for VectoredBufIter<T>where
T: Freeze,
impl<T> RefUnwindSafe for VectoredBufIter<T>where
T: RefUnwindSafe,
impl<T> Send for VectoredBufIter<T>where
T: Send,
impl<T> Sync for VectoredBufIter<T>where
T: Sync,
impl<T> Unpin for VectoredBufIter<T>where
T: Unpin,
impl<T> UnwindSafe for VectoredBufIter<T>where
T: UnwindSafe,
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