pub struct NotificationChannel {
sender: UnboundedSender<Notification>,
receiver: UnboundedReceiver<Notification>,
}Expand description
A handle to the UI-notification channel, which can be created before App.
The sender side is cloneable, so it can be shared with objects that are created before the
application, such as UserToolGate.
App::new() consumes this object, taking the receiver side into itself.
Fields§
§sender: UnboundedSender<Notification>The sender side (cloneable)
receiver: UnboundedReceiver<Notification>The receiver side (consumed by App)
Implementations§
Source§impl NotificationChannel
impl NotificationChannel
Sourcepub fn sender(&self) -> UnboundedSender<Notification>
pub fn sender(&self) -> UnboundedSender<Notification>
Clone the sender, for objects that need to notify the UI.
Sourcepub(crate) fn into_receiver(self) -> UnboundedReceiver<Notification>
pub(crate) fn into_receiver(self) -> UnboundedReceiver<Notification>
For App::new(): Consume and get the receiving end
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NotificationChannel
impl RefUnwindSafe for NotificationChannel
impl Send for NotificationChannel
impl Sync for NotificationChannel
impl Unpin for NotificationChannel
impl UnsafeUnpin for NotificationChannel
impl UnwindSafe for NotificationChannel
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