Struct tracing_core::field::FieldSet [−][src]
Describes the fields present on a span.
Implementations
impl FieldSet[src]
pub const fn new(names: &'static [&'static str], callsite: Identifier) -> Self[src]
Constructs a new FieldSet with the given array of field names and callsite.
pub fn field<Q: ?Sized>(&self, name: &Q) -> Option<Field> where
Q: Borrow<str>, [src]
Q: Borrow<str>,
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: Iffieldshares a name with a field in thisFieldSet, but was created by aFieldSetwith a different callsite, thisFieldSetdoes not contain it. This is so that if two separate span callsites define a field named "foo", theFieldcorresponding to "foo" for each of those callsites are not equivalent.
pub fn iter(&self) -> Iterⓘ[src]
Returns an iterator over the Fields 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
impl Debug for FieldSet[src]
impl Display for FieldSet[src]
impl<'a> IntoIterator for &'a FieldSet[src]
Auto Trait Implementations
impl !RefUnwindSafe for FieldSet[src]
impl Send for FieldSet[src]
impl Sync for FieldSet[src]
impl Unpin for FieldSet[src]
impl !UnwindSafe for FieldSet[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,