Struct AsyncifyFd
pub struct AsyncifyFd<S, F, D> { /* private fields */ }Expand description
Spawn a blocking function with a file descriptor in the thread pool.
Implementations§
§impl<S, F, D> AsyncifyFd<S, F, D>
impl<S, F, D> AsyncifyFd<S, F, D>
pub fn new(fd: SharedFd<S>, f: F) -> AsyncifyFd<S, F, D>
pub fn new(fd: SharedFd<S>, f: F) -> AsyncifyFd<S, F, D>
Create AsyncifyFd.
Trait Implementations§
§impl<S, F, D> IntoInner for AsyncifyFd<S, F, D>
impl<S, F, D> IntoInner for AsyncifyFd<S, F, D>
§fn into_inner(self) -> <AsyncifyFd<S, F, D> as IntoInner>::Inner
fn into_inner(self) -> <AsyncifyFd<S, F, D> as IntoInner>::Inner
Get the inner buffer.
§impl<S, D, F> OpCode for AsyncifyFd<S, F, D>
impl<S, D, F> OpCode for AsyncifyFd<S, F, D>
§fn pre_submit(self: Pin<&mut AsyncifyFd<S, F, D>>) -> Result<Decision, Error>
fn pre_submit(self: Pin<&mut AsyncifyFd<S, F, D>>) -> Result<Decision, Error>
Perform the operation before submit, and return
Decision to
indicate whether submitting the operation to polling is required.§fn operate(self: Pin<&mut AsyncifyFd<S, F, D>>) -> Poll<Result<usize, Error>>
fn operate(self: Pin<&mut AsyncifyFd<S, 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, S, F, D> Unpin for AsyncifyFd<S, F, D>where
<PinnedFieldsOfHelperStruct<__Origin<'__pin, S, F, D>> as PinnedFieldsOfHelperTrait>::Actual: Unpin,
Auto Trait Implementations§
impl<S, F, D> Freeze for AsyncifyFd<S, F, D>
impl<S, F, D> RefUnwindSafe for AsyncifyFd<S, F, D>where
F: RefUnwindSafe,
D: RefUnwindSafe,
impl<S, F, D> Send for AsyncifyFd<S, F, D>
impl<S, F, D> Sync for AsyncifyFd<S, F, D>
impl<S, F, D> UnwindSafe for AsyncifyFd<S, 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