pub struct FieldFormatter { /* private fields */ }Expand description
Serif’s formatter for event and span metadata fields.
FieldFormatter is intended to be used with SubscriberBuilder::fmt_fields and is designed
to work with EventFormatter’s output format.
FieldFormatter implements FormatFields, though this isn’t immediately clear in Rustdoc.
Specifically, FieldFormatter implements MakeVisitor, and FieldVisitor implements
Visit, VisitOutput, and VisitFmt. Thanks to blanket impls in the
tracing_subscriber crate, this means that FieldFormatter implements FormatFields.
§Field Format
If a field is named message, then it’s printed in the default text style. All other fields
are formatted in square brackets and dimmed text style like [name=value]. Padding is added on
either side of the message field, but not around other fields.
Implementations§
Trait Implementations§
Source§impl Clone for FieldFormatter
impl Clone for FieldFormatter
Source§fn clone(&self) -> FieldFormatter
fn clone(&self) -> FieldFormatter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldFormatter
impl Debug for FieldFormatter
Source§impl Default for FieldFormatter
impl Default for FieldFormatter
Source§impl<'a> MakeVisitor<Writer<'a>> for FieldFormatter
impl<'a> MakeVisitor<Writer<'a>> for FieldFormatter
Source§type Visitor = FieldVisitor<'a>
type Visitor = FieldVisitor<'a>
The visitor type produced by this
MakeVisitor.Source§fn make_visitor(&self, target: Writer<'a>) -> Self::Visitor
fn make_visitor(&self, target: Writer<'a>) -> Self::Visitor
Make a new visitor for the provided
target.Auto Trait Implementations§
impl Freeze for FieldFormatter
impl RefUnwindSafe for FieldFormatter
impl Send for FieldFormatter
impl Sync for FieldFormatter
impl Unpin for FieldFormatter
impl UnwindSafe for FieldFormatter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more