Module netstack3_sync::rc
source · Expand description
Synchronized reference counting primitives.
This module introduces a family of reference counted types that allows marking the underlying data for destruction before all strongly references to the data are dropped. This enables the following features:
- Upgrading a weak reference to a strong reference succeeds iff at least one strong reference exists and the data has not been marked for destruction.
- Allow waiting for all strongly-held references to be dropped after marking the data.
Structs§
- An implementation of
Notifier
that stores the unwrapped data in aClone
type. - Provides a
Debug
implementation that contains information helpful for debugging dangling references. - Like
DebugReferences
, but type-erases the contained type. - An implementation of
Notifier
that wraps anotherNotifier
and applies a function on notified objects. - A primary reference.
- A strongly-held reference.
- A weakly-held reference.
Traits§
- Provides delegated notification of all strong references of a
Primary
being dropped.