pub struct UiCtx { /* private fields */ }Expand description
Context given to event handlers. Collects the effects they ask for.
Implementations§
Source§impl UiCtx
impl UiCtx
pub fn toast(&mut self, message: impl Into<Text>)
Sourcepub fn notify(&mut self, toast: Toast)
pub fn notify(&mut self, toast: Toast)
A toast with a tone and maybe an action button: ui.notify(Toast::success(t!("saved"))).
Sourcepub fn close_and_refresh(&mut self)
pub fn close_and_refresh(&mut self)
Closes the window and refreshes the screen that opened it.
pub fn into_effects(self) -> Vec<Effect>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UiCtx
impl RefUnwindSafe for UiCtx
impl Send for UiCtx
impl Sync for UiCtx
impl Unpin for UiCtx
impl UnsafeUnpin for UiCtx
impl UnwindSafe for UiCtx
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