Skip to main content

AsyncReadAncillaryManaged

Trait AsyncReadAncillaryManaged 

pub trait AsyncReadAncillaryManaged: AsyncReadManaged {
    // Required method
    async fn read_managed_with_ancillary<C>(
        &mut self,
        len: usize,
        control: C,
    ) -> Result<Option<(Self::Buffer, C)>, Error>
       where C: IoBufMut;
}
Available on crate features io and ancillary only.
Expand description

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

Required Methods§

async fn read_managed_with_ancillary<C>( &mut self, len: usize, control: C, ) -> Result<Option<(Self::Buffer, C)>, Error>
where C: IoBufMut,

Read data into a managed buffer with ancillary data.

§Implementation Note
  • If len == 0, implementation should use buffer’s size as len
  • if len > 0, min(len, buffer_size) will be the max number of bytes to be read.

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.

Implementors§