pub struct AsyncifyFd2<S1, S2, F, D> { /* private fields */ }Expand description
Spawn a blocking function with two file descriptors in the thread pool.
Implementations§
Source§impl<S1, S2, F, D> AsyncifyFd2<S1, S2, F, D>
impl<S1, S2, F, D> AsyncifyFd2<S1, S2, F, D>
Sourcepub fn new(
fd1: SharedFd<S1>,
fd2: SharedFd<S2>,
f: F,
) -> AsyncifyFd2<S1, S2, F, D>
pub fn new( fd1: SharedFd<S1>, fd2: SharedFd<S2>, f: F, ) -> AsyncifyFd2<S1, S2, F, D>
Create AsyncifyFd2.
Trait Implementations§
Source§impl<S1, S2, F, D> IntoInner for AsyncifyFd2<S1, S2, F, D>
impl<S1, S2, F, D> IntoInner for AsyncifyFd2<S1, S2, F, D>
Source§fn into_inner(self) -> <AsyncifyFd2<S1, S2, F, D> as IntoInner>::Inner
fn into_inner(self) -> <AsyncifyFd2<S1, S2, F, D> as IntoInner>::Inner
Get the inner buffer.
Source§impl<S1, S2, D, F> OpCode for AsyncifyFd2<S1, S2, F, D>
impl<S1, S2, D, F> OpCode for AsyncifyFd2<S1, S2, F, D>
Source§fn create_entry(self: Pin<&mut AsyncifyFd2<S1, S2, F, D>>) -> OpEntry
fn create_entry(self: Pin<&mut AsyncifyFd2<S1, S2, F, D>>) -> OpEntry
Create submission entry.
Source§fn call_blocking(
self: Pin<&mut AsyncifyFd2<S1, S2, F, D>>,
) -> Result<usize, Error>
fn call_blocking( self: Pin<&mut AsyncifyFd2<S1, S2, F, D>>, ) -> Result<usize, Error>
Call the operation in a blocking way. This method will be called if Read more
Source§fn create_entry_fallback(self: Pin<&mut Self>) -> OpEntry
fn create_entry_fallback(self: Pin<&mut Self>) -> OpEntry
Create submission entry for fallback. This method will only be called if
create_entry returns an entry with unsupported opcode.Source§unsafe fn set_result(self: Pin<&mut Self>, _: &Result<usize, Error>, _: &Extra)
unsafe fn set_result(self: Pin<&mut Self>, _: &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
Source§impl<S1, S2, D, F> OpCode for AsyncifyFd2<S1, S2, F, D>
impl<S1, S2, D, F> OpCode for AsyncifyFd2<S1, S2, F, D>
Source§fn pre_submit(
self: Pin<&mut AsyncifyFd2<S1, S2, F, D>>,
) -> Result<Decision, Error>
fn pre_submit( self: Pin<&mut AsyncifyFd2<S1, S2, F, D>>, ) -> Result<Decision, Error>
Perform the operation before submit, and return
Decision to
indicate whether submitting the operation to polling is required.Source§fn operate(
self: Pin<&mut AsyncifyFd2<S1, S2, F, D>>,
) -> Poll<Result<usize, Error>>
fn operate( self: Pin<&mut AsyncifyFd2<S1, S2, F, D>>, ) -> Poll<Result<usize, Error>>
Perform the operation after received corresponding
event. If this operation is blocking, the return value should be
Poll::Ready.impl<'__pin, S1, S2, F, D> Unpin for AsyncifyFd2<S1, S2, F, D>where
<PinnedFieldsOfHelperStruct<__Origin<'__pin, S1, S2, F, D>> as PinnedFieldsOfHelperTrait>::Actual: Unpin,
Auto Trait Implementations§
impl<S1, S2, F, D> Freeze for AsyncifyFd2<S1, S2, F, D>
impl<S1, S2, F, D> RefUnwindSafe for AsyncifyFd2<S1, S2, F, D>where
F: RefUnwindSafe,
D: RefUnwindSafe,
impl<S1, S2, F, D> Send for AsyncifyFd2<S1, S2, F, D>
impl<S1, S2, F, D> Sync for AsyncifyFd2<S1, S2, F, D>
impl<S1, S2, F, D> !UnsafeUnpin for AsyncifyFd2<S1, S2, F, D>
impl<S1, S2, F, D> UnwindSafe for AsyncifyFd2<S1, S2, F, D>where
F: UnwindSafe,
D: UnwindSafe,
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