pub struct RefCount { /* private fields */ }Expand description
An intrusive reference counter.
Users should place this structure into their own type, and implement
RefCounted to enable the support for intrusive ref-counting.
The ways to initialize a RefCount is only to use its
new method or use the Default trait.
For users who want some unsafe hints, when some type including this
structure wants to implement Clone, a new instance of RefCount should be
assigned to the cloned value, or undefined behavior will happen in place.
Hence, no “byte copying” should be considered.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for RefCount
impl Send for RefCount
impl Sync for RefCount
impl Unpin for RefCount
impl UnwindSafe for RefCount
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more