# tracing_core::dispatcher::get_default - Rust
API documentation for the Rust `get_default` fn in crate `tracing_core`.
Keywords: rust, rustlang, rust-lang, get_default

# Function tracing_core::dispatcher::get_default [−] [src]

    pub fn get_default<T, F>(f: F) -> T where
        F: FnMut(&Dispatch) -> T,

Executes a closure with a reference to this thread's current dispatcher.

Note that calls to `get_default` should not be nested; if this function is called while inside of another `get_default`, that closure will be provided with `Dispatch::none` rather than the previously set dispatcher.