pub struct EventListener {
pub id: ListenerId,
/* private fields */
}Expand description
Represents a single event listener.
Uses an unbounded channel intentionally: flush() is called
synchronously from the handler’s poll loop and cannot await a
bounded channel’s back-pressure. Bounding the channel would
require either dropping events (behaviour change) or making
the flush path async (large refactor). Consumers that register
a listener must poll the resulting EventStream to prevent
unbounded growth.
Fields§
§id: ListenerIdUnique id for this listener (used for immediate removal).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventListener
impl !RefUnwindSafe for EventListener
impl Send for EventListener
impl !Sync for EventListener
impl Unpin for EventListener
impl UnsafeUnpin for EventListener
impl !UnwindSafe for EventListener
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