Lines Matching full:reference
3 //! Internal reference counting support.
7 /// Types that are _always_ reference counted.
10 /// Additionally, it allows users to convert from a shared reference `&T` to an owned reference
14 /// Rust code, the recommendation is to use [`Arc`](crate::sync::Arc) to create reference-counted
19 /// Implementers must ensure that increments to the reference count keep the object alive in memory
22 /// Implementers must also ensure that all instances are reference-counted. (Otherwise they
26 /// Increments the reference count on the object.
29 /// Decrements the reference count on the object.
35 /// Callers must ensure that there was a previous matching increment to the reference count,
36 /// and that the object is no longer used after its reference count is decremented (as it may
43 /// An owned reference to an always-reference-counted object.
45 /// The object's reference count is automatically decremented when an instance of [`ARef`] is
52 /// particular, the [`ARef`] instance owns an increment on the underlying object's reference count.
61 // mutable reference, for example, when the reference count reaches zero and `T` is dropped.
67 // `ARef<T>` on that thread, so the thread may ultimately access `T` using a mutable reference, for
68 // example, when the reference count reaches zero and `T` is dropped.
74 /// It takes over an increment of the reference count on the underlying object.
78 /// Callers must ensure that the reference count was incremented at least once, and that they
150 // SAFETY: The type invariants guarantee that the `ARef` owns the reference we're about to in drop()