pub struct ChangeNotifier(/* private fields */);
Expand description
Allows you to check or indicate that an Application
has changed
A ChangeNotifier
can be obtained from an application with the
change_notifier()
method.
Implementations§
Source§impl ChangeNotifier
impl ChangeNotifier
Sourcepub fn change(&mut self)
pub fn change(&mut self)
Mark the application as having changed, this will force the UI to re-render its components
Sourcepub fn has_changed(&self) -> bool
pub fn has_changed(&self) -> bool
Check whether or not the application has changed
Sourcepub fn consume_change(&mut self) -> bool
pub fn consume_change(&mut self) -> bool
Get whether the application has changed and atomically set it’s changed state to `false
Trait Implementations§
Source§impl Clone for ChangeNotifier
impl Clone for ChangeNotifier
Source§fn clone(&self) -> ChangeNotifier
fn clone(&self) -> ChangeNotifier
Returns a copy 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 moreSource§impl Debug for ChangeNotifier
impl Debug for ChangeNotifier
Source§impl Default for ChangeNotifier
impl Default for ChangeNotifier
Source§fn default() -> ChangeNotifier
fn default() -> ChangeNotifier
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChangeNotifier
impl RefUnwindSafe for ChangeNotifier
impl Send for ChangeNotifier
impl Sync for ChangeNotifier
impl Unpin for ChangeNotifier
impl UnwindSafe for ChangeNotifier
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