try_init

Function try_init 

Source
pub fn try_init(
    layers: Vec<Box<dyn Layer<Registry> + Send + Sync + 'static>>,
) -> Result<()>
Expand description

Creates a Registry, adds the given Layers to it, and attempts to set self as the global default subscriber in the current scope, returning an error if one is already set.

See try_init

ยงErrors

  • An error can be thrown on registry initialization