Trait tracing_subscriber::field::MakeVisitor [−][src]
pub trait MakeVisitor<T> {
type Visitor: Visit;
fn make_visitor(&self, target: T) -> Self::Visitor;
}
Expand description
Creates new visitors.
A type implementing MakeVisitor
represents a composable factory for types
implementing the Visit
trait. The MakeVisitor
trait defines
a single function, make_visitor
, which takes in a T
-typed target
and
returns a type implementing Visit
configured for that target. A target may
be a string, output stream, or data structure that the visitor will record
data to, configuration variables that determine the visitor’s behavior, or
()
when no input is required to produce a visitor.
Associated Types
Required methods
fn make_visitor(&self, target: T) -> Self::Visitor
fn make_visitor(&self, target: T) -> Self::Visitor
Make a new visitor for the provided target
.
Implementors
impl<'a> MakeVisitor<&'a mut (dyn Write + 'a)> for DefaultFields
This is supported on crate feature fmt
only.
impl<'a> MakeVisitor<&'a mut (dyn Write + 'a)> for DefaultFields
This is supported on crate feature
fmt
only.type Visitor = DefaultVisitor<'a>
impl<'a> MakeVisitor<&'a mut (dyn Write + 'a)> for PrettyFields
This is supported on crate feature fmt
only.
impl<'a> MakeVisitor<&'a mut (dyn Write + 'a)> for PrettyFields
This is supported on crate feature
fmt
only.