A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.rs/tracing/latest/tracing/dispatcher/struct.WeakDispatch.html below:

WeakDispatch in tracing::dispatcher - Rust

Struct WeakDispatchSource
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.

§Examples
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