IoVectoredBuf

Trait IoVectoredBuf 

Source
pub trait IoVectoredBuf: 'static {
    // Required method
    unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>;

    // Provided methods
    unsafe fn io_slices(&self) -> Vec<IoSlice> { ... }
    unsafe fn iter_io_slice(&self) -> impl Iterator<Item = IoSlice> { ... }
    fn iter_slice(&self) -> impl Iterator<Item = &[u8]> { ... }
    fn total_len(&self) -> usize { ... }
    fn total_capacity(&self) -> usize { ... }
    fn owned_iter(self) -> Result<VectoredBufIter<Self>, Self>
       where Self: Sized { ... }
    fn slice(self, begin: usize) -> VectoredSlice<Self>
       where Self: Sized { ... }
}
Expand description

A trait for vectored buffers.

Required Methods§

Source

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

An iterator over the IoBuffers.

§Safety

The returned slice must not live longer than self. It is static to provide convenience from writing self-referenced structure.

Provided Methods§

Source

unsafe fn io_slices(&self) -> Vec<IoSlice>

Collected IoSlices of the buffers.

§Safety

The returned slice must not live longer than self. It is static to provide convenience from writing self-referenced structure.

Source

unsafe fn iter_io_slice(&self) -> impl Iterator<Item = IoSlice>

An iterator over the IoSlices.

§Safety

The returned slice must not live longer than self. It is static to provide convenience from writing self-referenced structure.

Source

fn iter_slice(&self) -> impl Iterator<Item = &[u8]>

An iterator over slices.

Source

fn total_len(&self) -> usize

The total length of all buffers.

Source

fn total_capacity(&self) -> usize

The total capacity of all buffers.

Source

fn owned_iter(self) -> Result<VectoredBufIter<Self>, Self>
where Self: Sized,

Wrap self into an owned iterator.

Source

fn slice(self, begin: usize) -> VectoredSlice<Self>
where Self: Sized,

Get an owned view with a specific offset.

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 IoVectoredBuf for ()

Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Source§

impl<T: IoBuf> IoVectoredBuf for &'static [T]

Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Source§

impl<T: IoBuf> IoVectoredBuf for &'static mut [T]

Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Source§

impl<T: IoBuf> IoVectoredBuf for (T,)

Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Source§

impl<T: IoBuf, A: Allocator + 'static> IoVectoredBuf for Vec<T, A>

Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Source§

impl<T: IoBuf, Rest: IoVectoredBuf> IoVectoredBuf for (T, Rest)

Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Source§

impl<T: IoBuf, const N: usize> IoVectoredBuf for [T; N]

Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Source§

impl<T: IoBuf, const N: usize> IoVectoredBuf for ArrayVec<T, N>

Available on crate feature arrayvec only.
Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Source§

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

Available on crate feature smallvec only.
Source§

unsafe fn iter_io_buffer(&self) -> impl Iterator<Item = IoBuffer>

Implementors§