pub struct NotificationSender { /* private fields */ }Expand description
A handle a worker thread posts notifications through.
Send, Copy and free to make: the queue it feeds belongs to the Host, so every handle
reaches the same one. Nothing it does calls the Renderer. It queues, and the Host asks
for a frame in which the queue is written into the batch.
ⓘ
let notifications = NotificationSender::new();
std::thread::spawn(move || {
run_session();
notifications.post(Notification::new("Session finished").key("session/7"));
});Implementations§
Trait Implementations§
Source§impl Clone for NotificationSender
impl Clone for NotificationSender
impl Copy for NotificationSender
Source§impl Debug for NotificationSender
impl Debug for NotificationSender
Source§impl Default for NotificationSender
impl Default for NotificationSender
impl Eq for NotificationSender
Source§impl PartialEq for NotificationSender
impl PartialEq for NotificationSender
impl StructuralPartialEq for NotificationSender
Auto Trait Implementations§
impl Freeze for NotificationSender
impl RefUnwindSafe for NotificationSender
impl Send for NotificationSender
impl Sync for NotificationSender
impl Unpin for NotificationSender
impl UnsafeUnpin for NotificationSender
impl UnwindSafe for NotificationSender
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