pub struct RawEventQueue { /* private fields */ }Expand description
An event queue that buffers incoming SimpleX events independently of client activity.
Backed by an unbounded channel. If events are not consumed they accumulate indefinitely. Drop the queue as soon as it is no longer needed. When dropped while a chat instance is active and producing events, the Haskell-side queue is still drained continuously - events are discarded in Rust and do not accumulate in the FFI layer.
Implementations§
Source§impl RawEventQueue
impl RawEventQueue
Sourcepub async fn next_event(&mut self) -> Option<Result<Event>>
pub async fn next_event(&mut self) -> Option<Result<Event>>
Returns the next event from the queue, or None if the chat has shut down.
Sourcepub fn into_receiver(self) -> EventReceiver
pub fn into_receiver(self) -> EventReceiver
Unwraps the queue into the underlying tokio unbounded receiver for more advanced use cases.
Auto Trait Implementations§
impl Freeze for RawEventQueue
impl RefUnwindSafe for RawEventQueue
impl Send for RawEventQueue
impl Sync for RawEventQueue
impl Unpin for RawEventQueue
impl UnsafeUnpin for RawEventQueue
impl UnwindSafe for RawEventQueue
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