Struct opentelemetry_api::KeyValue
source · pub struct KeyValue {
pub key: Key,
pub value: Value,
}
Expand description
A key-value pair describing an attribute.
Fields§
§key: Key
The attribute name
value: Value
The attribute value
Implementations§
Trait Implementations§
source§impl<S> Extend<KeyValue> for OrderMap<Key, Value, S>where
S: BuildHasher,
impl<S> Extend<KeyValue> for OrderMap<Key, Value, S>where S: BuildHasher,
source§fn 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.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl From<KeyValue> for KeyValueMetadata
impl From<KeyValue> for KeyValueMetadata
source§impl FromIterator<KeyValue> for Baggage
impl FromIterator<KeyValue> for Baggage
source§impl<S> FromIterator<KeyValue> for OrderMap<Key, Value, S>where
S: BuildHasher + Default,
impl<S> FromIterator<KeyValue> for OrderMap<Key, Value, S>where S: BuildHasher + Default,
source§impl PartialEq for KeyValue
impl PartialEq 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§
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