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§
Sourcetype Buffer<'a>
type Buffer<'a>
Selected buffer type. It keeps the reference to the buffer pool and returns the buffer back on drop.
Sourcetype BufferPool
type BufferPool
Buffer pool type.
Required Methods§
Sourcefn take_buffer(
self,
buffer_pool: &Self::BufferPool,
result: Result<usize>,
flags: u32,
) -> Result<Self::Buffer<'_>>
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.
impl<S> TakeBuffer for ReadManagedAt<S>
Available on non-
io_uring
or fusion
only.type Buffer<'a> = BorrowedBuffer<'a>
type BufferPool = BufferPool
Source§impl<S> TakeBuffer for RecvManaged<S>
Available on non-io_uring
or fusion
only.
impl<S> TakeBuffer for RecvManaged<S>
Available on non-
io_uring
or fusion
only.