pub struct EventQueue<N>where
N: Notify,{ /* private fields */ }
Expand description
An event queue for broadcasting events to multiple clients. Clients that failed to receive events or do not receive events fast enough will be dropped.
Implementations§
Source§impl<N> EventQueue<N>where
N: Notify,
impl<N> EventQueue<N>where
N: Notify,
Sourcepub fn new() -> (impl Future<Output = ()>, ControlHandle<N>)
pub fn new() -> (impl Future<Output = ()>, ControlHandle<N>)
Create a new EventQueue
and returns a future for the event queue and a control handle
to control the event queue.
Sourcepub fn with_limit(limit: usize) -> (impl Future<Output = ()>, ControlHandle<N>)
pub fn with_limit(limit: usize) -> (impl Future<Output = ()>, ControlHandle<N>)
Set the maximum number of events each client can have in the queue. Clients exceeding this limit will be dropped. The default value if not set is 10.
Auto Trait Implementations§
impl<N> Freeze for EventQueue<N>
impl<N> !RefUnwindSafe for EventQueue<N>
impl<N> Send for EventQueue<N>
impl<N> Sync for EventQueue<N>
impl<N> Unpin for EventQueue<N>
impl<N> !UnwindSafe for EventQueue<N>
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