pub struct Notifications { /* private fields */ }Implementations§
Source§impl Notifications
impl Notifications
pub fn init() -> Self
pub fn sender(&self) -> NotificationSender
pub fn receiver(&self) -> Arc<Mutex<Receiver<NotificationType>>>
pub async fn send( &self, notification: NotificationType, ) -> WasmToolkitResult<()>
Sourcepub async fn send_final(&self, notification: NotificationType)
pub async fn send_final(&self, notification: NotificationType)
Logs the error to console instead of returning it
pub fn schedule_removal(&self, secs: u32, element_id: String)
pub fn close_channel(self) -> bool
Auto Trait Implementations§
impl Freeze for Notifications
impl !RefUnwindSafe for Notifications
impl Send for Notifications
impl Sync for Notifications
impl Unpin for Notifications
impl UnsafeUnpin for Notifications
impl !UnwindSafe for Notifications
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