pub struct CallbackWaiter<K, R> { /* private fields */ }
Implementations§
Source§impl<K: Hash + Eq + Clone + 'static + Send, R: 'static + Send> CallbackWaiter<K, R>
impl<K: Hash + Eq + Clone + 'static + Send, R: 'static + Send> CallbackWaiter<K, R>
pub fn new() -> Self
pub fn create_result_future( &self, callback_id: K, ) -> WaiterResult<ResultFuture<'_, R>>
pub fn create_timeout_result_future( &self, callback_id: K, timeout: Duration, ) -> WaiterResult<ResultFuture<'_, R>>
pub fn set_result(&self, callback_id: K, result: R) -> Result<(), WaiterError>
pub fn set_result_with_cache(&self, callback_id: K, result: R)
Auto Trait Implementations§
impl<K, R> !Freeze for CallbackWaiter<K, R>
impl<K, R> RefUnwindSafe for CallbackWaiter<K, R>
impl<K, R> Send for CallbackWaiter<K, R>
impl<K, R> Sync for CallbackWaiter<K, R>
impl<K, R> Unpin for CallbackWaiter<K, R>
impl<K, R> UnwindSafe for CallbackWaiter<K, R>
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