pub trait WeakRef {
type Strong: StrongRef<Weak = Self>;
// Required method
fn upgrade(&self) -> Option<Self::Strong>;
// Provided method
fn is_expired(&self) -> bool { ... }
}
Expand description
A trait for weak references.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn is_expired(&self) -> bool
fn is_expired(&self) -> bool
Is the given weak element expired?
The default implemention checks whether a strong reference can be
obtained via upgrade
.