pub struct FieldSet { /* private fields */ }
Expand description
Describes the fields present on a span.
Implementations§
Source§impl FieldSet
impl FieldSet
Sourcepub fn field<Q>(&self, name: &Q) -> Option<Field>
pub fn field<Q>(&self, name: &Q) -> Option<Field>
Returns the Field
named name
, or None
if no such field exists.
Sourcepub fn contains(&self, field: &Field) -> bool
pub fn contains(&self, field: &Field) -> bool
Returns true
if self
contains the given field
.
Note: If field
shares a name with a field in this FieldSet
, but
was created by a FieldSet
with a different callsite, this FieldSet
does not contain it. This is so that if two separate span callsites
define a field named “foo”, the Field
corresponding to “foo” for each
of those callsites are not equivalent.
Trait Implementations§
Source§impl<'a> IntoIterator for &'a FieldSet
impl<'a> IntoIterator for &'a FieldSet
Auto Trait Implementations§
impl Freeze for FieldSet
impl !RefUnwindSafe for FieldSet
impl Send for FieldSet
impl Sync for FieldSet
impl Unpin for FieldSet
impl !UnwindSafe for FieldSet
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