Expand description
Type definitions for putting shared ownership and synchronized mutation behind the threading
feature toggle.
That way, single-threaded applications will not have to use thread-safe primitives, and simply do not specify the ‘threading’ feature.
Functions§
- downgrade_
mut_ to_ ref parallel
Downgrade a handle previously obtained withget_mut()
to drop mutation support. - get_mut
parallel
Get a mutable reference through aMutableOnDemand
for read-write access. - get_ref
parallel
Get a shared reference through aMutableOnDemand
for read-only access. - lock
parallel
Get a mutable reference through aMutable
for read-write access. - make_
mut parallel
Get a mutable reference to the underlying data, with semantics similar to Arc::make_mut(). - map_ref
parallel
Map a read guard into a sub-type it contains.
Type Aliases§
- Mapped
RefGuard parallel
A mapped reference created from aRefGuard
- Mutable
parallel
A synchronization primitive which provides read-write access right away. - Mutable
OnDemand parallel
A synchronization primitive which can start read-only and transition to support mutation. - Once
Cell parallel
andonce_cell
A thread-safe cell which can be written to only once. - OwnShared
parallel
A reference counted pointer type for shared ownership. - RefGuard
parallel
A guarded reference suitable for safekeeping in a struct.