pub trait ReferenceNotifiers {
    type ReferenceReceiver<T: 'static>: 'static;
    type ReferenceNotifier<T: Send + 'static>: Notifier<T> + 'static;

    // Required method
    fn new_reference_notifier<T>(
        debug_references: DynDebugReferences
    ) -> (Self::ReferenceNotifier<T>, Self::ReferenceReceiver<T>)
       where T: Send + 'static;
}
Expand description

A context trait determining the types to be used for reference notifications.

Required Associated Types§

source

type ReferenceReceiver<T: 'static>: 'static

The receiver for shared reference destruction notifications.

source

type ReferenceNotifier<T: Send + 'static>: Notifier<T> + 'static

The notifier for shared reference destruction notifications.

Required Methods§

source

fn new_reference_notifier<T>( debug_references: DynDebugReferences ) -> (Self::ReferenceNotifier<T>, Self::ReferenceReceiver<T>)
where T: Send + 'static,

Creates a new Notifier/Receiver pair for T.

debug_references is given to provide information on outstanding references that caused the notifier to be requested.

Object Safety§

This trait is not object safe.

Implementors§