pub struct Mediator<T, E> { /* private fields */ }Expand description
A mediator is a central hub for communication between futures.
Implementations§
Source§impl<T, E> Mediator<T, E>
impl<T, E> Mediator<T, E>
Sourcepub fn try_lock(&self) -> Option<MutexGuard<'_, Shared<T, E>>>
pub fn try_lock(&self) -> Option<MutexGuard<'_, Shared<T, E>>>
Attempt to acquire the shared data lock immediately.
If the lock is currently held, this will return None.
Sourcepub async fn notify_all<Events: AsRef<[E]>>(&self, events: Events)
pub async fn notify_all<Events: AsRef<[E]>>(&self, events: Events)
Emit all events
Trait Implementations§
Auto Trait Implementations§
impl<T, E> Freeze for Mediator<T, E>
impl<T, E> !RefUnwindSafe for Mediator<T, E>
impl<T, E> Send for Mediator<T, E>
impl<T, E> Sync for Mediator<T, E>
impl<T, E> Unpin for Mediator<T, E>
impl<T, E> !UnwindSafe for Mediator<T, E>
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