Type Definition tracing_subscriber::fmt::writer::OptionalWriter[][src]

pub type OptionalWriter<T> = EitherWriter<T, Sink>;
This is supported on crate feature fmt only.
Expand description

A writer which may or may not be enabled.

This may be used by MakeWriter implementations that wish to conditionally enable or disable the returned writer based on a span or event’s Metadata.

Implementations

Returns a disabled writer.

Any bytes written to the returned writer are discarded.

This is equivalent to returning Option::None.

Returns an enabled writer of type T.

This is equivalent to returning Option::Some.

Trait Implementations

Performs the conversion.