pub trait RefCount {
type Value;
// Required methods
fn one() -> Self;
fn is_one(val: &Self::Value) -> bool;
fn load_acquire(&self) -> Self::Value;
fn fence_acquire(&self);
fn fetch_inc_relaxed(&self) -> Self::Value;
fn fetch_dec_release(&self) -> Self::Value;
}Expand description
Trait for refcount
Some method names explain required memory ordering in multi-threaded context.
Required Associated Types§
Required Methods§
Sourcefn load_acquire(&self) -> Self::Value
fn load_acquire(&self) -> Self::Value
Sourcefn fence_acquire(&self)
fn fence_acquire(&self)
Sourcefn fetch_inc_relaxed(&self) -> Self::Value
fn fetch_inc_relaxed(&self) -> Self::Value
Sourcefn fetch_dec_release(&self) -> Self::Value
fn fetch_dec_release(&self) -> Self::Value
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.