pub struct IndexedIter<T> { /* private fields */ }
Expand description
An owned iterator over an indexable container.
Implementations§
Source§impl<T: Indexable> IndexedIter<T>
impl<T: Indexable> IndexedIter<T>
Sourcepub fn new(bufs: T) -> Result<Self, T>
pub fn new(bufs: T) -> Result<Self, T>
Create a new IndexedIter
from an indexable container. If the
container is empty, return the buffer back in Err(T)
.
Trait Implementations§
Source§impl<T> IntoInner for IndexedIter<T>
impl<T> IntoInner for IndexedIter<T>
Source§impl<T> IoBuf for IndexedIter<T>
impl<T> IoBuf for IndexedIter<T>
Source§impl<T> IoBufMut for IndexedIter<T>
impl<T> IoBufMut for IndexedIter<T>
Source§fn as_buf_mut_ptr(&mut self) -> *mut u8
fn as_buf_mut_ptr(&mut self) -> *mut u8
Returns a raw mutable pointer to the vector’s buffer. Read more
Source§fn as_mut_slice(&mut self) -> &mut [MaybeUninit<u8>]
fn as_mut_slice(&mut self) -> &mut [MaybeUninit<u8>]
Get the uninitialized part of the buffer.
Source§unsafe fn as_io_slice_mut(&mut self) -> IoSliceMut
unsafe fn as_io_slice_mut(&mut self) -> IoSliceMut
Create an
IoSliceMut
of the uninitialized part of the buffer. Read moreSource§impl<T: Indexable> OwnedIterator for IndexedIter<T>
impl<T: Indexable> OwnedIterator for IndexedIter<T>
Source§impl<T> SetBufInit for IndexedIter<T>
impl<T> SetBufInit for IndexedIter<T>
Source§unsafe fn set_buf_init(&mut self, len: usize)
unsafe fn set_buf_init(&mut self, len: usize)
Set the buffer length. If
len
is less than the current length, nothing
should happen. Read moreAuto Trait Implementations§
impl<T> Freeze for IndexedIter<T>where
T: Freeze,
impl<T> RefUnwindSafe for IndexedIter<T>where
T: RefUnwindSafe,
impl<T> Send for IndexedIter<T>where
T: Send,
impl<T> Sync for IndexedIter<T>where
T: Sync,
impl<T> Unpin for IndexedIter<T>where
T: Unpin,
impl<T> UnwindSafe for IndexedIter<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