Trait TakeBuffer

Source
pub trait TakeBuffer {
    type Buffer<'a>;
    type BufferPool;

    // Required method
    fn take_buffer(
        self,
        buffer_pool: &Self::BufferPool,
        result: Result<usize>,
        flags: u32,
    ) -> Result<Self::Buffer<'_>>;
}
Expand description

Trait to get the selected buffer of an io operation.

Required Associated Types§

Source

type Buffer<'a>

Selected buffer type. It keeps the reference to the buffer pool and returns the buffer back on drop.

Source

type BufferPool

Buffer pool type.

Required Methods§

Source

fn take_buffer( self, buffer_pool: &Self::BufferPool, result: Result<usize>, flags: u32, ) -> Result<Self::Buffer<'_>>

Take the selected buffer with buffer_pool, io result and flags, if io operation is success.

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§

Source§

impl<S> TakeBuffer for ReadManagedAt<S>

Available on non-io_uring or fusion only.
Source§

impl<S> TakeBuffer for RecvManaged<S>

Available on non-io_uring or fusion only.