Trait netstack3_base::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.

Object Safety§

This trait is not object safe.

Implementors§