tracing_subscriber::field

Trait VisitOutput

Source
pub trait VisitOutput<Out>: Visit {
    // Required method
    fn finish(self) -> Out;

    // Provided method
    fn visit<R>(self, fields: &R) -> Out
       where R: RecordFields,
             Self: Sized { ... }
}
Expand description

A visitor that produces output once it has visited a set of fields.

Required Methods§

Source

fn finish(self) -> Out

Completes the visitor, returning any output.

This is called once a full set of fields has been visited.

Provided Methods§

Source

fn visit<R>(self, fields: &R) -> Out
where R: RecordFields, Self: Sized,

Visit a set of fields, and return the output of finishing the visitor once the fields have been visited.

Implementors§

Source§

impl VisitOutput<Result<(), Error>> for DefaultVisitor<'_>

Available on crate features fmt and std only.
Source§

impl VisitOutput<Result<(), Error>> for JsonVisitor<'_>

Available on crate features fmt and std only.
Source§

impl VisitOutput<Result<(), Error>> for PrettyVisitor<'_>

Available on crate features fmt and std only.
Source§

impl<'a, F> VisitOutput<Result<(), Error>> for FieldFnVisitor<'a, F>
where F: Fn(&mut Writer<'a>, &Field, &dyn Debug) -> Result,

Available on crate features fmt and std only.
Source§

impl<D, V> VisitOutput<Result<(), Error>> for VisitDelimited<D, V>
where V: VisitFmt, D: AsRef<str>,

Source§

impl<V, O> VisitOutput<O> for Alt<V>
where V: VisitOutput<O>,

Source§

impl<V, O> VisitOutput<O> for Messages<V>
where V: VisitOutput<O>,