Struct opentelemetry_api::KeyValue
source · [−]Expand description
A key-value pair describing an attribute.
Fields
key: Key
The attribute name
value: Value
The attribute value
Implementations
Trait Implementations
sourceimpl<S> Extend<KeyValue> for OrderMap<Key, Value, S>where
S: BuildHasher,
Available on crate feature trace
only.
impl<S> Extend<KeyValue> for OrderMap<Key, Value, S>where
S: BuildHasher,
trace
only.sourcefn extend<I: IntoIterator<Item = KeyValue>>(&mut self, iterable: I)
fn extend<I: IntoIterator<Item = KeyValue>>(&mut self, iterable: I)
Extend the map with all key-value pairs in the iterable.
This is equivalent to calling insert
for each of
them in order, which means that for keys that already existed
in the map, their value is updated but it keeps the existing order.
New keys are inserted in the order they appear in the sequence. If equivalents of a key occur more than once, the last corresponding value prevails.
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl From<KeyValue> for KeyValueMetadata
impl From<KeyValue> for KeyValueMetadata
sourceimpl FromIterator<KeyValue> for Baggage
impl FromIterator<KeyValue> for Baggage
sourcefn from_iter<I: IntoIterator<Item = KeyValue>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = KeyValue>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl<S> FromIterator<KeyValue> for OrderMap<Key, Value, S>where
S: BuildHasher + Default,
Available on crate feature trace
only.
impl<S> FromIterator<KeyValue> for OrderMap<Key, Value, S>where
S: BuildHasher + Default,
trace
only.sourcefn from_iter<I: IntoIterator<Item = KeyValue>>(iterable: I) -> Self
fn from_iter<I: IntoIterator<Item = KeyValue>>(iterable: I) -> Self
Create an OrderMap
from the sequence of key-value pairs in the
iterable.
from_iter
uses the same logic as extend
. See
extend
for more details.
sourceimpl PartialEq<KeyValue> for KeyValue
impl PartialEq<KeyValue> for KeyValue
impl StructuralPartialEq for KeyValue
Auto Trait Implementations
impl RefUnwindSafe for KeyValue
impl Send for KeyValue
impl Sync for KeyValue
impl Unpin for KeyValue
impl UnwindSafe for KeyValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more