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§
Sourcetype ReferenceReceiver<T: 'static>: 'static
type ReferenceReceiver<T: 'static>: 'static
The receiver for shared reference destruction notifications.
Sourcetype ReferenceNotifier<T: Send + 'static>: Notifier<T> + 'static
type ReferenceNotifier<T: Send + 'static>: Notifier<T> + 'static
The notifier for shared reference destruction notifications.
Required Methods§
Sourcefn new_reference_notifier<T>(
debug_references: DynDebugReferences,
) -> (Self::ReferenceNotifier<T>, Self::ReferenceReceiver<T>)where
T: Send + 'static,
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.
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.