Struct may_waiter::WaiterMap
source · [−]pub struct WaiterMap<K, T> { /* private fields */ }
Expand description
Waiter map that could be used to wait response for given keys
Implementations
sourceimpl<K: Hash + Eq, T> WaiterMap<K, T>
impl<K: Hash + Eq, T> WaiterMap<K, T>
pub fn new() -> Self
sourcepub fn new_waiter(&self, id: K) -> WaiterGuard<'_, K, T> where
K: Clone,
pub fn new_waiter(&self, id: K) -> WaiterGuard<'_, K, T> where
K: Clone,
return a waiter on the stack!
sourcepub fn set_rsp(&self, id: &K, rsp: T) -> Result<(), T> where
K: Debug,
pub fn set_rsp(&self, id: &K, rsp: T) -> Result<(), T> where
K: Debug,
set rsp for the corresponding waiter
sourcepub fn cancel_all(&mut self)
pub fn cancel_all(&mut self)
cancel all the waiting waiter, all wait would return NotFound error
Trait Implementations
Auto Trait Implementations
impl<K, T> !RefUnwindSafe for WaiterMap<K, T>
impl<K, T> Send for WaiterMap<K, T> where
K: Send,
T: Send,
impl<K, T> Sync for WaiterMap<K, T> where
K: Send + Sync,
T: Send,
impl<K, T> Unpin for WaiterMap<K, T>
impl<K, T> UnwindSafe for WaiterMap<K, T> where
K: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more