netstack3_sync::rc

Trait Notifier

Source
pub trait Notifier<T>: Send {
    // Required method
    fn notify(&mut self, data: T);
}
Expand description

Provides delegated notification of all strong references of a Primary being dropped.

See Primary::unwrap_with_notifier.

Required Methods§

Source

fn notify(&mut self, data: T)

Called when the data contained in the Primary reference can be extracted out because there are no more strong references to it.

Implementations on Foreign Types§

Source§

impl<T> Notifier<T> for Infallible

A handy implementation for the common Infallible “Never” type.

Source§

fn notify(&mut self, _data: T)

Implementors§

Source§

impl<A, B, N: Notifier<B>, F: FnOnce(A) -> B> Notifier<A> for MapNotifier<N, F>
where Self: Send,

Source§

impl<T: Send> Notifier<T> for ArcNotifier<T>