Struct RecvFromMulti
pub struct RecvFromMulti<S>where
S: AsFd,{ /* private fields */ }Expand description
Receive data and source address multi times into multiple managed buffers.
Implementations§
§impl<S> RecvFromMulti<S>where
S: AsFd,
impl<S> RecvFromMulti<S>where
S: AsFd,
pub fn new(
fd: S,
pool: &BufferPool,
flags: RecvFlags,
) -> Result<RecvFromMulti<S>, Error>
pub fn new( fd: S, pool: &BufferPool, flags: RecvFlags, ) -> Result<RecvFromMulti<S>, Error>
Create RecvFromMulti.
Trait Implementations§
§impl<S> OpCode for RecvFromMulti<S>where
S: AsFd,
impl<S> OpCode for RecvFromMulti<S>where
S: AsFd,
§fn pre_submit(
&mut self,
control: &mut <RecvFromMulti<S> as OpCode>::Control,
) -> Result<Decision, Error>
fn pre_submit( &mut self, control: &mut <RecvFromMulti<S> as OpCode>::Control, ) -> Result<Decision, Error>
Perform the operation before submit, and return
Decision to
indicate whether submitting the operation to polling is required.§fn op_type(
&mut self,
control: &mut <RecvFromMulti<S> as OpCode>::Control,
) -> Option<OpType>
fn op_type( &mut self, control: &mut <RecvFromMulti<S> as OpCode>::Control, ) -> Option<OpType>
Get the operation type when an event is occurred.
§fn operate(
&mut self,
control: &mut <RecvFromMulti<S> as OpCode>::Control,
) -> Poll<Result<usize, Error>>
fn operate( &mut self, control: &mut <RecvFromMulti<S> as OpCode>::Control, ) -> Poll<Result<usize, Error>>
Perform the operation after received corresponding
event. If this operation is blocking, the return value should be
Poll::Ready.§unsafe fn set_result(
&mut self,
_: &mut <RecvFromMulti<S> as OpCode>::Control,
result: &Result<usize, Error>,
_: &Extra,
)
unsafe fn set_result( &mut self, _: &mut <RecvFromMulti<S> as OpCode>::Control, result: &Result<usize, Error>, _: &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
§impl<S> TakeBuffer for RecvFromMulti<S>where
S: AsFd,
impl<S> TakeBuffer for RecvFromMulti<S>where
S: AsFd,
§type Buffer = RecvFromMultiResult
type Buffer = RecvFromMultiResult
Type of the buffer.
§fn take_buffer(self) -> Option<<RecvFromMulti<S> as TakeBuffer>::Buffer>
fn take_buffer(self) -> Option<<RecvFromMulti<S> as TakeBuffer>::Buffer>
Take buffer.
Auto Trait Implementations§
impl<S> Freeze for RecvFromMulti<S>where
S: Freeze,
impl<S> !RefUnwindSafe for RecvFromMulti<S>
impl<S> !Send for RecvFromMulti<S>
impl<S> !Sync for RecvFromMulti<S>
impl<S> Unpin for RecvFromMulti<S>where
S: Unpin,
impl<S> UnsafeUnpin for RecvFromMulti<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for RecvFromMulti<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