pub struct SnackbarController { /* private fields */ }Implementations§
Source§impl SnackbarController
impl SnackbarController
pub fn new(overlay: OverlayHandle) -> Self
Sourcepub fn ambient() -> Self
pub fn ambient() -> Self
Resolve the ambient handle installed by the runtime
(with_ambient_overlay), falling back to a fresh handle when
composition runs outside a runtime frame (tests, previews).
Sourcepub fn handle(&self) -> OverlayHandle
pub fn handle(&self) -> OverlayHandle
The handle this controller posts entries to.
Sourcepub fn next_deadline() -> Option<Instant>
pub fn next_deadline() -> Option<Instant>
Earliest Instant when any snackbar needs to wake (dismiss start or
finish). None if no snackbar is active.
pub fn show(&self, request: SnackbarRequest)
pub fn tick(&self)
pub fn dismiss(&self)
pub fn current(&self) -> Option<(String, Option<SnackbarAction>)>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SnackbarController
impl !Send for SnackbarController
impl !Sync for SnackbarController
impl !UnwindSafe for SnackbarController
impl Forget for SnackbarController
impl Freeze for SnackbarControllerwhere
*const RcInner<SnackbarControllerInner> is !null: Freeze,
PhantomData<RcInner<SnackbarControllerInner>>: Freeze,
impl Move for SnackbarController
impl Unpin for SnackbarController
impl UnsafeUnpin for SnackbarControllerwhere
*const RcInner<SnackbarControllerInner> is !null: UnsafeUnpin,
PhantomData<RcInner<SnackbarControllerInner>>: UnsafeUnpin,
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