pub struct ToastController { /* private fields */ }Implementations§
Source§impl ToastController
impl ToastController
pub fn global<H: UiHost>(app: &mut H) -> Self
Sourcepub fn toast(
&self,
host: &mut dyn UiActionHost,
window: AppWindowId,
request: ToastRequest,
) -> ToastId
pub fn toast( &self, host: &mut dyn UiActionHost, window: AppWindowId, request: ToastRequest, ) -> ToastId
Dispatches a toast request.
Note: this is an upsert. If request.id is set and still refers to an open toast, the
existing toast is updated.
pub fn dismiss( &self, host: &mut dyn UiActionHost, window: AppWindowId, id: ToastId, ) -> bool
pub fn dismiss_all( &self, host: &mut dyn UiActionHost, window: AppWindowId, ) -> usize
Trait Implementations§
Source§impl Clone for ToastController
impl Clone for ToastController
Source§fn clone(&self) -> ToastController
fn clone(&self) -> ToastController
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ToastController
impl !RefUnwindSafe for ToastController
impl !Send for ToastController
impl !Sync for ToastController
impl Unpin for ToastController
impl UnsafeUnpin for ToastController
impl !UnwindSafe for ToastController
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