Struct compio_buf::OwnedIter

source ·
pub struct OwnedIter<I: OwnedIterator>(/* private fields */);
Expand description

An owned buffer iterator for vectored buffers. See IoVectoredBuf::owned_iter.

Implementations§

source§

impl<I: OwnedIterator> OwnedIter<I>

source

pub fn new(inner: I) -> Self

Create OwnedIter from inner impls.

source

pub fn next(self) -> Result<Self, I::Inner>

Get the next buffer. Will return Err with the inner buffer if it reaches the end.

Trait Implementations§

source§

impl<I: Debug + OwnedIterator> Debug for OwnedIter<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I: OwnedIterator> IntoInner for OwnedIter<I>

§

type Inner = <I as IntoInner>::Inner

The inner type.
source§

fn into_inner(self) -> Self::Inner

Get the inner buffer.
source§

impl<I: OwnedIterator + 'static> IoBuf for OwnedIter<I>

source§

fn as_buf_ptr(&self) -> *const u8

Returns a raw pointer to the vector’s buffer. Read more
source§

fn buf_len(&self) -> usize

Number of initialized bytes. Read more
source§

fn buf_capacity(&self) -> usize

Total size of the buffer, including uninitialized memory, if any. Read more
source§

fn as_slice(&self) -> &[u8]

Get the initialized part of the buffer.
source§

unsafe fn as_io_slice(&self) -> IoSlice

Create an IoSlice of this buffer. Read more
source§

fn slice(self, range: impl RangeBounds<usize>) -> Slice<Self>
where Self: Sized,

Returns a view of the buffer with the specified range. Read more
source§

fn filled(&self) -> bool

Indicate whether the buffer has been filled (uninit portion is empty)
source§

impl<I: OwnedIteratorMut + 'static> IoBufMut for OwnedIter<I>

source§

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>]

Get the uninitialized part of the buffer.
source§

unsafe fn as_io_slice_mut(&mut self) -> IoSliceMut

Create an IoSliceMut of the uninitialized part of the buffer. Read more
source§

impl<I: OwnedIteratorMut + 'static> SetBufInit for OwnedIter<I>

source§

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 more

Auto Trait Implementations§

§

impl<I> Freeze for OwnedIter<I>
where I: Freeze,

§

impl<I> RefUnwindSafe for OwnedIter<I>
where I: RefUnwindSafe,

§

impl<I> Send for OwnedIter<I>
where I: Send,

§

impl<I> Sync for OwnedIter<I>
where I: Sync,

§

impl<I> Unpin for OwnedIter<I>
where I: Unpin,

§

impl<I> UnwindSafe for OwnedIter<I>
where I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.