Struct tracing::field::FieldSet [−][src]
pub struct FieldSet { /* fields omitted */ }
Describes the fields present on a span.
Implementations
impl FieldSet
[src]
impl FieldSet
[src]pub const fn new(
names: &'static [&'static str],
callsite: Identifier
) -> FieldSet
[src]
names: &'static [&'static str],
callsite: Identifier
) -> FieldSet
Constructs a new FieldSet
with the given array of field names and callsite.
pub fn field<Q>(&self, name: &Q) -> Option<Field> where
Q: Borrow<str> + ?Sized,
[src]
Q: Borrow<str> + ?Sized,
Returns the Field
named name
, or None
if no such field exists.
pub fn contains(&self, field: &Field) -> bool
[src]
Returns true
if self
contains the given field
.
ⓘNote
Note: Iffield
shares a name with a field in thisFieldSet
, but was created by aFieldSet
with a different callsite, thisFieldSet
does not contain it. This is so that if two separate span callsites define a field named "foo", theField
corresponding to "foo" for each of those callsites are not equivalent.
pub fn iter(&self) -> Iterⓘ
[src]
Returns an iterator over the Field
s in this FieldSet
.
pub fn len(&self) -> usize
[src]
Returns the number of fields in this FieldSet
.
pub fn is_empty(&self) -> bool
[src]
Returns whether or not this FieldSet
has fields.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for FieldSet
impl Send for FieldSet
impl Sync for FieldSet
impl Unpin for FieldSet
impl !UnwindSafe for FieldSet
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T: Future> Future for Instrumented<T> type Output = T::Output;
[src]
Notable traits for Instrumented<T>
impl<T: Future> Future for Instrumented<T> type Output = T::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T: Future> Future for Instrumented<T> type Output = T::Output;
[src]
Notable traits for Instrumented<T>
impl<T: Future> Future for Instrumented<T> type Output = T::Output;