netstack3_base

Trait ReferenceNotifiersExt

Source
pub trait ReferenceNotifiersExt: ReferenceNotifiers {
    // Provided method
    fn unwrap_or_notify_with_new_reference_notifier<S: Send + Sync + 'static, O: Send, F: Send + Copy + 'static + FnOnce(S) -> O>(
        primary: PrimaryRc<S>,
        map: F,
    ) -> RemoveResourceResultWithContext<O, Self> { ... }
}
Expand description

An extension of ReferenceNotifiers providing extra functionality.

Provided Methods§

Source

fn unwrap_or_notify_with_new_reference_notifier<S: Send + Sync + 'static, O: Send, F: Send + Copy + 'static + FnOnce(S) -> O>( primary: PrimaryRc<S>, map: F, ) -> RemoveResourceResultWithContext<O, Self>

Unwraps a PrimaryRc if it has no pending references, otherwise notifying with [Self::ReferenceNotifier].

S: Is the state held behind the PrimaryRc. O: Is the desired output state, once references have been destructed. F: Is a function that converts S to O.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§