[][src]Struct tracing_subscriber::fmt::Layer

pub struct Layer<S, N = DefaultFields, E = Format<Full>, W = fn() -> Stdout> { /* fields omitted */ }

A Layer that logs formatted representations of tracing events.

Examples

Constructing a default fmt subscriber via the Layer API:

use tracing_subscriber::{fmt, registry::Registry};
use tracing_subscriber::prelude::*;

let subscriber = fmt::Layer::default()
    .with_subscriber(Registry::default());

tracing::subscriber::set_global_default(subscriber).unwrap();

Methods

impl<S> Layer<S>[src]

pub fn builder() -> LayerBuilder<S>[src]

Returns a new LayerBuilder for configuring a Layer.

Trait Implementations

impl<S: Debug, N: Debug, E: Debug, W: Debug> Debug for Layer<S, N, E, W>[src]

impl<S> Default for Layer<S> where
    S: Subscriber + for<'a> LookupSpan<'a>, 
[src]

impl<S, N, E, W> Layer<S> for Layer<S, N, E, W> where
    S: Subscriber + for<'a> LookupSpan<'a>,
    N: for<'writer> FormatFields<'writer> + 'static,
    E: FormatEvent<S, N> + 'static,
    W: MakeWriter + 'static, 
[src]

Auto Trait Implementations

impl<S, N, E, W> RefUnwindSafe for Layer<S, N, E, W> where
    E: RefUnwindSafe,
    N: RefUnwindSafe,
    S: RefUnwindSafe,
    W: RefUnwindSafe

impl<S, N, E, W> Send for Layer<S, N, E, W> where
    E: Send,
    N: Send,
    S: Send,
    W: Send

impl<S, N, E, W> Sync for Layer<S, N, E, W> where
    E: Sync,
    N: Sync,
    S: Sync,
    W: Sync

impl<S, N, E, W> Unpin for Layer<S, N, E, W> where
    E: Unpin,
    N: Unpin,
    S: Unpin,
    W: Unpin

impl<S, N, E, W> UnwindSafe for Layer<S, N, E, W> where
    E: UnwindSafe,
    N: UnwindSafe,
    S: UnwindSafe,
    W: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.