pub struct ChangeNotifier { /* private fields */ }Expand description
Offers a composable way to listen for the availability of new work from providers.
Implementations§
Source§impl ChangeNotifier
impl ChangeNotifier
Sourcepub fn add_listener(
&self,
listener: impl 'static + Fn() + Send + Sync,
) -> ChangeNotificationListener
pub fn add_listener( &self, listener: impl 'static + Fn() + Send + Sync, ) -> ChangeNotificationListener
Registers the specified callback to be invoked upon change. Returns a listener that must be kept alive to receive notifications.
Trait Implementations§
Source§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