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

# Function tracing::dispatcher::set_default [−] [src]

    #[must_use = "Dropping the guard unregisters the dispatcher."]pub fn set_default(dispatcher: &Dispatch) -> DefaultGuard

Sets the dispatch as the default dispatch for the duration of the lifetime of the returned DefaultGuard

ⓘNote

    Note: This function required the Rust standard library.
    no_std users should use
    set_global_default instead.