compio_buf

Trait IoVectoredBufMut

Source
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§

Source

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§

Source

unsafe fn io_slices_mut(&mut self) -> Vec<IoSliceMut>

An iterator for the IoSliceMuts 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]

Source§

fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>

Source§

impl<T: IoBufMut, A: Allocator + 'static> IoVectoredBufMut for Vec<T, A>

Source§

fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>

Source§

impl<T: IoBufMut, const N: usize> IoVectoredBufMut for [T; N]

Source§

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.
Source§

fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>

Source§

impl<T: IoBufMut, const N: usize> IoVectoredBufMut for SmallVec<[T; N]>
where [T; N]: Array<Item = T>,

Available on crate feature smallvec only.
Source§

fn iter_buf_mut(&mut self) -> impl Iterator<Item = MaybeOwnedMut<'_, Self::Buf>>

Implementors§