Trait compio_buf::IoVectoredBuf
source · pub trait IoVectoredBuf: 'static {
type Buf: IoBuf;
type OwnedIter: OwnedIterator<Inner = Self> + IoBuf;
// Required methods
fn iter_buf(&self) -> impl Iterator<Item = MaybeOwned<'_, Self::Buf>>;
fn owned_iter(self) -> Result<Self::OwnedIter, Self>
where Self: Sized;
// Provided method
unsafe fn io_slices(&self) -> Vec<IoSlice> { ... }
}Expand description
A trait for vectored buffers.
Required Associated Types§
sourcetype OwnedIter: OwnedIterator<Inner = Self> + IoBuf
type OwnedIter: OwnedIterator<Inner = Self> + IoBuf
The owned iterator that wraps Self.
Required Methods§
sourcefn iter_buf(&self) -> impl Iterator<Item = MaybeOwned<'_, Self::Buf>>
fn iter_buf(&self) -> impl Iterator<Item = MaybeOwned<'_, Self::Buf>>
An iterator over the buffers that’s either owned or borrowed with
MaybeOwned.
sourcefn owned_iter(self) -> Result<Self::OwnedIter, Self>where
Self: Sized,
fn owned_iter(self) -> Result<Self::OwnedIter, Self>where
Self: Sized,
Wrap self into an owned iterator.
Provided Methods§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<T: IoBuf> IoVectoredBuf for &'static [T]
impl<T: IoBuf> IoVectoredBuf for &'static [T]
source§impl<T: IoBuf> IoVectoredBuf for &'static mut [T]
impl<T: IoBuf> IoVectoredBuf for &'static mut [T]
source§impl<T: IoBuf, const N: usize> IoVectoredBuf for ArrayVec<T, N>
Available on crate feature arrayvec only.
impl<T: IoBuf, const N: usize> IoVectoredBuf for ArrayVec<T, N>
Available on crate feature
arrayvec only.