Skip to main content

AsyncReadAncillary

Trait AsyncReadAncillary 

Source
pub trait AsyncReadAncillary {
    // Required methods
    async fn read_with_ancillary<T, C>(
        &mut self,
        buffer: T,
        control: C,
    ) -> BufResult<(usize, usize), (T, C)>
       where T: IoBufMut,
             C: IoBufMut;
    async fn read_vectored_with_ancillary<T, C>(
        &mut self,
        buffer: T,
        control: C,
    ) -> BufResult<(usize, usize), (T, C)>
       where T: IoVectoredBufMut,
             C: IoBufMut;
}
Available on crate features io and ancillary only.
Expand description

Trait for asynchronous read with ancillary (control) data. Intended for connected stream sockets (TCP, Unix streams) where no source address is needed.

Required Methods§

Source

async fn read_with_ancillary<T, C>( &mut self, buffer: T, control: C, ) -> BufResult<(usize, usize), (T, C)>
where T: IoBufMut, C: IoBufMut,

Read data with ancillary data into an owned buffer.

Source

async fn read_vectored_with_ancillary<T, C>( &mut self, buffer: T, control: C, ) -> BufResult<(usize, usize), (T, C)>

Read data with ancillary data into a vectored buffer.

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<A> AsyncReadAncillary for &mut A

Source§

async fn read_with_ancillary<T, C>( &mut self, buffer: T, control: C, ) -> BufResult<(usize, usize), (T, C)>
where T: IoBufMut, C: IoBufMut,

Source§

async fn read_vectored_with_ancillary<T, C>( &mut self, buffer: T, control: C, ) -> BufResult<(usize, usize), (T, C)>

Implementors§