pub struct WeakDispatch { /* private fields */ }
Expand description Implementations§ Source§ impl WeakDispatch Source pub fn upgrade(&self) -> Option<Dispatch>
Attempts to upgrade this WeakDispatch
to a Dispatch
.
Returns None
if the referenced Dispatch
has already been dropped.
let strong = Dispatch::new(NoSubscriber::default());
let weak = strong.downgrade();
// The strong here keeps it alive, so we can still access the object.
assert!(weak.upgrade().is_some());
drop(strong); // But not any more.
assert!(weak.upgrade().is_none());
Trait Implementations§ Auto Trait Implementations§ Blanket Implementations§
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4