Record in tracing_core::span - Rust (original) (raw)
pub struct Record<'a> { /* private fields */ }
Expand description
A set of fields recorded by a span.
Implementations§
impl<'a> Record<'a>
pub fn new(values: &'a ValueSet<'a>) -> Self
Constructs a new Record
from a ValueSet
.
pub fn record(&self, visitor: &mut dyn Visit)
Records all the fields in this Record
with the provided Visitor.
pub fn len(&self) -> usize
Returns the number of fields that would be visited from this Record
when Record::record() is called
pub fn contains(&self, field: &Field) -> bool
Returns true
if this Record
contains a value for the given Field
.
pub fn is_empty(&self) -> bool
Returns true if this Record
contains no values.