pub trait SubscriberExt: Subscriber + Sealed {
    // Provided method
    fn with<L>(self, layer: L) -> Layered<L, Self>
       where L: Layer<Self>,
             Self: Sized { ... }
}
Expand description

Extension trait adding a with(Layer) combinator to Subscribers.

Provided Methods§

source

fn with<L>(self, layer: L) -> Layered<L, Self>
where L: Layer<Self>, Self: Sized,

Wraps self with the provided layer.

Examples found in repository?
examples/app/log_layers.rs (line 26)
25
26
27
fn update_subscriber(subscriber: BoxedSubscriber) -> BoxedSubscriber {
    Box::new(subscriber.with(CustomLayer))
}

Implementors§

source§

impl<S> SubscriberExt for S
where S: Subscriber,