Struct Field
pub struct Field { /* private fields */ }
An opaque key allowing O(1) access to a field in a Span's key-value
data.
As keys are defined by the metadata of a span, rather than by an individual instance of a span, a key may be used to access the same field across all instances of a given span with the same metadata. Thus, when a subscriber observes a new span, it need only access a field by name once, and use the key for that name for all other accesses.
Implementations
impl Field
fn callsite(&self) -> IdentifierReturns an
Identifierthat uniquely identifies theCallsitewhich defines this field.fn name(&self) -> &'static strReturns a string representing the name of the field.
fn index(&self) -> usizeReturns the index of this field in its
FieldSet.
Trait Implementations
impl AsRef<str> for Field
fn as_ref(&self) -> &str
impl Clone for Field
fn clone(&self) -> Self
impl Debug for Field
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for Field
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Field
impl Hash for Field
fn hash<H>(&self, state: &mut H) where H: Hasher,
impl PartialEq for Field
fn eq(&self, other: &Self) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for Field
impl !UnwindSafe for Field
impl Freeze for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
Blanket Implementations
impl<T> Any for Field
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Field
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Field
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Field
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Field
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Field
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for Field
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for Field
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Field
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Field
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>