pub trait IoVectoredBufMut: IoVectoredBuf<Buf: IoBufMut, OwnedIter: IoBufMut> + SetBufInit {
// Required method
fn iter_buf_mut(
&mut self,
) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>;
// Provided method
unsafe fn io_slices_mut(&mut self) -> Vec<IoSliceMut> { ... }
}
Expand description
A trait for mutable vectored buffers.
Required Methods§
Sourcefn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>
fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>
An iterator over the buffers that’s either owned or mutably borrowed
with MaybeOwnedMut
.
Provided Methods§
Sourceunsafe fn io_slices_mut(&mut self) -> Vec<IoSliceMut>
unsafe fn io_slices_mut(&mut self) -> Vec<IoSliceMut>
An iterator for the IoSliceMut
s of the buffers.
§Safety
The return slice will not live longer than self. It is static to provide convenience from writing self-referenced structure.
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: IoBufMut> IoVectoredBufMut for &'static mut [T]
impl<T: IoBufMut> IoVectoredBufMut for &'static mut [T]
fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>
Source§impl<T: IoBufMut, A: Allocator + 'static> IoVectoredBufMut for Vec<T, A>
impl<T: IoBufMut, A: Allocator + 'static> IoVectoredBufMut for Vec<T, A>
fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>
Source§impl<T: IoBufMut, const N: usize> IoVectoredBufMut for [T; N]
impl<T: IoBufMut, const N: usize> IoVectoredBufMut for [T; N]
fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>
Source§impl<T: IoBufMut, const N: usize> IoVectoredBufMut for ArrayVec<T, N>
Available on crate feature arrayvec
only.
impl<T: IoBufMut, const N: usize> IoVectoredBufMut for ArrayVec<T, N>
Available on crate feature
arrayvec
only.fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>
Source§impl<T: IoBufMut, const N: usize> IoVectoredBufMut for SmallVec<[T; N]>
Available on crate feature smallvec
only.
impl<T: IoBufMut, const N: usize> IoVectoredBufMut for SmallVec<[T; N]>
Available on crate feature
smallvec
only.