pub struct ShareWeak<T> { /* private fields */ }
Expand description
Implementations§
sourcepub fn upgrade(&self) -> Option<Share<T>>
pub fn upgrade(&self) -> Option<Share<T>>
If there are still strong references to the shared data,
returns a new Share
. Otherwise the shared data has been
dropped, and so returns None
.
sourcepub fn strong_count(&self) -> usize
pub fn strong_count(&self) -> usize
Return the number of strong references to the shared data
sourcepub fn weak_count(&self) -> usize
pub fn weak_count(&self) -> usize
Return the number of weak references to the shared data, including this one, or 0 if there are no strong pointers remaining.