Struct task_pool::ChangeNotifier
source · 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 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