pub struct RecvFromManaged<S>where
S: AsFd,{ /* private fields */ }Expand description
A fused RecvFromManaged operation
Implementations§
Source§impl<S> RecvFromManaged<S>where
S: AsFd,
impl<S> RecvFromManaged<S>where
S: AsFd,
Sourcepub fn new(
fd: S,
pool: &BufferPool,
len: usize,
flags: i32,
) -> Result<RecvFromManaged<S>, Error>
pub fn new( fd: S, pool: &BufferPool, len: usize, flags: i32, ) -> Result<RecvFromManaged<S>, Error>
Create a new RecvFromManaged.
Trait Implementations§
Source§impl<S> OpCode for RecvFromManaged<S>where
S: AsFd,
impl<S> OpCode for RecvFromManaged<S>where
S: AsFd,
Source§fn create_entry(self: Pin<&mut RecvFromManaged<S>>) -> OpEntry
fn create_entry(self: Pin<&mut RecvFromManaged<S>>) -> OpEntry
Create submission entry.
Source§fn create_entry_fallback(self: Pin<&mut RecvFromManaged<S>>) -> OpEntry
fn create_entry_fallback(self: Pin<&mut RecvFromManaged<S>>) -> OpEntry
Create submission entry for fallback. This method will only be called if
create_entry returns an entry with unsupported opcode.Source§fn call_blocking(self: Pin<&mut RecvFromManaged<S>>) -> Result<usize, Error>
fn call_blocking(self: Pin<&mut RecvFromManaged<S>>) -> Result<usize, Error>
Call the operation in a blocking way. This method will be called if Read more
Source§unsafe fn set_result(
self: Pin<&mut RecvFromManaged<S>>,
result: &Result<usize, Error>,
extra: &Extra,
)
unsafe fn set_result( self: Pin<&mut RecvFromManaged<S>>, result: &Result<usize, Error>, extra: &Extra, )
Set the result when it completes.
The operation stores the result and is responsible to release it if the
operation is cancelled. Read more
Source§unsafe fn push_multishot(
self: Pin<&mut RecvFromManaged<S>>,
result: Result<usize, Error>,
extra: Extra,
)
unsafe fn push_multishot( self: Pin<&mut RecvFromManaged<S>>, result: Result<usize, Error>, extra: Extra, )
Push a multishot result to the inner queue. Read more
Source§fn pop_multishot(
self: Pin<&mut RecvFromManaged<S>>,
) -> Option<BufResult<usize, Extra>>
fn pop_multishot( self: Pin<&mut RecvFromManaged<S>>, ) -> Option<BufResult<usize, Extra>>
Pop a multishot result from the inner queue.
Source§impl<S> OpCode for RecvFromManaged<S>where
S: AsFd,
impl<S> OpCode for RecvFromManaged<S>where
S: AsFd,
Source§fn pre_submit(self: Pin<&mut RecvFromManaged<S>>) -> Result<Decision, Error>
fn pre_submit(self: Pin<&mut RecvFromManaged<S>>) -> Result<Decision, Error>
Perform the operation before submit, and return
Decision to
indicate whether submitting the operation to polling is required.Source§fn op_type(self: Pin<&mut RecvFromManaged<S>>) -> Option<OpType>
fn op_type(self: Pin<&mut RecvFromManaged<S>>) -> Option<OpType>
Get the operation type when an event is occurred.
Source§fn operate(self: Pin<&mut RecvFromManaged<S>>) -> Poll<Result<usize, Error>>
fn operate(self: Pin<&mut RecvFromManaged<S>>) -> Poll<Result<usize, Error>>
Perform the operation after received corresponding
event. If this operation is blocking, the return value should be
Poll::Ready.Source§impl<S> TakeBuffer for RecvFromManaged<S>where
S: AsFd,
impl<S> TakeBuffer for RecvFromManaged<S>where
S: AsFd,
Source§type BufferPool = BufferPool
type BufferPool = BufferPool
Buffer pool type.
Source§type Buffer<'a> = (BorrowedBuffer<'a>, Option<SockAddr>)
type Buffer<'a> = (BorrowedBuffer<'a>, Option<SockAddr>)
Selected buffer type. It keeps the reference to the buffer pool and
returns the buffer back on drop.
Source§fn take_buffer(
self,
buffer_pool: &<RecvFromManaged<S> as TakeBuffer>::BufferPool,
result: Result<usize, Error>,
buffer_id: u16,
) -> Result<<RecvFromManaged<S> as TakeBuffer>::Buffer<'_>, Error>
fn take_buffer( self, buffer_pool: &<RecvFromManaged<S> as TakeBuffer>::BufferPool, result: Result<usize, Error>, buffer_id: u16, ) -> Result<<RecvFromManaged<S> as TakeBuffer>::Buffer<'_>, Error>
Take the selected buffer with
buffer_pool, io result and
buffer_id, if io operation is success.Auto Trait Implementations§
impl<S> Freeze for RecvFromManaged<S>where
S: Freeze,
impl<S> !RefUnwindSafe for RecvFromManaged<S>
impl<S> !Send for RecvFromManaged<S>
impl<S> !Sync for RecvFromManaged<S>
impl<S> Unpin for RecvFromManaged<S>where
S: Unpin,
impl<S> !UnsafeUnpin for RecvFromManaged<S>
impl<S> !UnwindSafe for RecvFromManaged<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more