pub struct PendingNotificationQueue { /* private fields */ }Expand description
Thread-safe queue for notifications from background threads.
Registered as a Service in ServiceRegistry so that both the
background threads (which have Arc<ServiceRegistry>) and the
command handler (which has SessionRuntime) can access it.
Implementations§
Source§impl PendingNotificationQueue
impl PendingNotificationQueue
Sourcepub fn push(&self, level: PendingLevel, title: impl Into<String>)
pub fn push(&self, level: PendingLevel, title: impl Into<String>)
Push a simple notification from any thread.
Convenience method for sourceless push operations.
For source-tagged or progress notifications, use push_op.
Sourcepub fn push_op(&self, source: Option<String>, op: PendingOp)
pub fn push_op(&self, source: Option<String>, op: PendingOp)
Push a notification operation with optional source attribution.
Sourcepub fn drain(&self) -> Vec<PendingEntry>
pub fn drain(&self) -> Vec<PendingEntry>
Drain all pending entries.
Called from the command handler context where SessionRuntime
is available to forward them to the display system.
Trait Implementations§
Source§impl Debug for PendingNotificationQueue
impl Debug for PendingNotificationQueue
Source§impl Default for PendingNotificationQueue
impl Default for PendingNotificationQueue
impl Service for PendingNotificationQueue
Auto Trait Implementations§
impl !Freeze for PendingNotificationQueue
impl !RefUnwindSafe for PendingNotificationQueue
impl Send for PendingNotificationQueue
impl Sync for PendingNotificationQueue
impl Unpin for PendingNotificationQueue
impl UnsafeUnpin for PendingNotificationQueue
impl UnwindSafe for PendingNotificationQueue
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