pub trait Rcb<T>: Clone + Deref<Target = T> {
type Weak: WeakRcb<T>;
// Required methods
fn new(x: T) -> Self;
fn try_unwrap(this: Self) -> Result<T, Self>;
fn downgrade(this: &Self) -> Self::Weak;
}
Expand description
Trait for reference-counted boxes.
Required Associated Types§
Required Methods§
fn new(x: T) -> Self
fn try_unwrap(this: Self) -> Result<T, Self>
fn downgrade(this: &Self) -> Self::Weak
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.