[][src]Struct opentelemetry::Key

pub struct Key(_);

Key used for metric LabelSets and trace Span attributes.

Implementations

impl Key[src]

pub fn new<S: Into<Cow<'static, str>>>(value: S) -> Self[src]

Create a new Key.

pub const fn from_static_str(value: &'static str) -> Self[src]

Create a new const Key.

pub fn bool<T: Into<bool>>(&self, value: T) -> KeyValue[src]

Create a KeyValue pair for bool values.

pub fn i64(&self, value: i64) -> KeyValue[src]

Create a KeyValue pair for i64 values.

pub fn f64(&self, value: f64) -> KeyValue[src]

Create a KeyValue pair for f64 values.

pub fn string<T: Into<Cow<'static, str>>>(&self, value: T) -> KeyValue[src]

Create a KeyValue pair for String values.

pub fn array<T: Into<Array>>(&self, value: T) -> KeyValue[src]

Create a KeyValue pair for arrays.

pub fn as_str(&self) -> &str[src]

Returns a reference to the underlying key name

Trait Implementations

impl Clone for Key[src]

impl Debug for Key[src]

impl<'de> Deserialize<'de> for Key[src]

impl Display for Key[src]

impl Eq for Key[src]

impl From<&'static str> for Key[src]

fn from(key_str: &'static str) -> Self[src]

Convert a &str to a Key.

impl From<Key> for String[src]

fn from(key: Key) -> Self[src]

Converts Key instances into String.

impl From<String> for Key[src]

fn from(string: String) -> Self[src]

Convert a String to a Key.

impl Hash for Key[src]

impl Ord for Key[src]

impl PartialEq<Key> for Key[src]

impl PartialOrd<Key> for Key[src]

impl Serialize for Key[src]

impl StructuralEq for Key[src]

impl StructuralPartialEq for Key[src]

Auto Trait Implementations

impl RefUnwindSafe for Key

impl Send for Key

impl Sync for Key

impl Unpin for Key

impl UnwindSafe for Key

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,