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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so 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.Source§impl<T: IoBuf, const N: usize> IoVectoredBuf for SmallVec<[T; N]>
Available on crate feature smallvec
only.
impl<T: IoBuf, const N: usize> IoVectoredBuf for SmallVec<[T; N]>
Available on crate feature
smallvec
only.