pub struct Hooks<E: Occurrence> { /* private fields */ }Expand description
The enqueue side, held by whatever observes application events.
Implementations§
Source§impl<E: Occurrence> Hooks<E>
impl<E: Occurrence> Hooks<E>
Sourcepub fn deliver(&self, event: &E)
pub fn deliver(&self, event: &E)
Renders an event once and offers it to every subscribed hook.
Never blocks and never fails: rendering happens once even with several
hooks, then each subscribed dispatcher receives the immutable envelope
through a bounded try_send. Its ordering queue drops the oldest event
when the endpoint cannot keep up.
Trait Implementations§
Source§impl<E: Occurrence> Clone for Hooks<E>
impl<E: Occurrence> Clone for Hooks<E>
Auto Trait Implementations§
impl<E> !RefUnwindSafe for Hooks<E>
impl<E> !UnwindSafe for Hooks<E>
impl<E> Forget for Hooks<E>
impl<E> Freeze for Hooks<E>
impl<E> Move for Hooks<E>
impl<E> Send for Hooks<E>
impl<E> Sync for Hooks<E>
impl<E> Unpin for Hooks<E>
impl<E> UnsafeUnpin for Hooks<E>where
Renderer<E>: UnsafeUnpin,
Arc<Vec<Arc<Shared<E>>>>: UnsafeUnpin,
Arc<dyn HookObserver<<E as Occurrence>::Kind>>: UnsafeUnpin,
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