pub struct EventQueue { /* private fields */ }Expand description
An event queue buffers events if you’re not actively processing them so it’s recommended to drop it as soon as it no longer needed.
Implementations§
Source§impl EventQueue
impl EventQueue
Sourcepub async fn next_event(&mut self) -> Option<Result<Event>>
pub async fn next_event(&mut self) -> Option<Result<Event>>
Can return a SimpleX event or a tokio_tungstenite::tungstenite::Error if a connection is dropped due to a
web socket failure. SimpleX events can themselves represent SimpleX errors but recognizing
and handling them them is a task of the upstream code.
Sourcepub fn into_receiver(self) -> UnboundedReceiver<Result<Event>>
pub fn into_receiver(self) -> UnboundedReceiver<Result<Event>>
Get the underlying tokio unbounded receiver that enables more complicated use cases.
Auto Trait Implementations§
impl Freeze for EventQueue
impl RefUnwindSafe for EventQueue
impl Send for EventQueue
impl Sync for EventQueue
impl Unpin for EventQueue
impl UnwindSafe for EventQueue
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