Enum PushEntry
pub enum PushEntry<K, R> {
Pending(K),
Ready(R),
}Expand description
The return type of Proactor::push.
Variants§
Pending(K)
The operation is pushed to the submission queue.
Ready(R)
The operation is ready and returns.
Implementations§
§impl<K, R> PushEntry<K, R>
impl<K, R> PushEntry<K, R>
pub const fn is_ready(&self) -> bool
pub const fn is_ready(&self) -> bool
Get if the current variant is PushEntry::Ready.
pub fn take_ready(self) -> Option<R>
pub fn take_ready(self) -> Option<R>
Take the ready variant if exists.
pub fn map_pending<L>(self, f: impl FnOnce(K) -> L) -> PushEntry<L, R>
pub fn map_pending<L>(self, f: impl FnOnce(K) -> L) -> PushEntry<L, R>
Map the PushEntry::Pending branch.
pub fn map_ready<S>(self, f: impl FnOnce(R) -> S) -> PushEntry<K, S>
pub fn map_ready<S>(self, f: impl FnOnce(R) -> S) -> PushEntry<K, S>
Map the PushEntry::Ready branch.
Trait Implementations§
Auto Trait Implementations§
impl<K, R> Freeze for PushEntry<K, R>
impl<K, R> RefUnwindSafe for PushEntry<K, R>where
K: RefUnwindSafe,
R: RefUnwindSafe,
impl<K, R> Send for PushEntry<K, R>
impl<K, R> Sync for PushEntry<K, R>
impl<K, R> Unpin for PushEntry<K, R>
impl<K, R> UnwindSafe for PushEntry<K, R>where
K: UnwindSafe,
R: 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