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§
source§impl<K, R> PushEntry<K, R>
impl<K, R> PushEntry<K, R>
sourcepub const fn is_ready(&self) -> bool
pub const fn is_ready(&self) -> bool
Get if the current variant is PushEntry::Ready
.
sourcepub fn take_ready(self) -> Option<R>
pub fn take_ready(self) -> Option<R>
Take the ready variant if exists.
sourcepub 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.
sourcepub 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.
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