pub struct KeyValue<'a, F>where
F: StorageFamily + 'a,{
pub key: F::String<'a>,
pub value: F::Value<'a>,
}Expand description
A key-value attribute pair used in telemetry data.
Key-value pairs provide additional context for spans, events, and log messages.
§Examples
use veecle_telemetry::protocol::transient::KeyValue;
// Create attributes with different value types
let user_id = KeyValue::new("user_id", 123);
let username = KeyValue::new("username", "alice");
let is_active = KeyValue::new("is_active", true);
let score = KeyValue::new("score", 95.5);Fields§
§key: F::String<'a>The attribute key (name).
value: F::Value<'a>The attribute value.
Implementations§
Trait Implementations§
Source§impl<'de, 'a, F> Deserialize<'de> for KeyValue<'a, F>
impl<'de, 'a, F> Deserialize<'de> for KeyValue<'a, F>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a, F> Freeze for KeyValue<'a, F>
impl<'a, F> RefUnwindSafe for KeyValue<'a, F>where
<F as StorageFamily>::String<'a>: RefUnwindSafe,
<F as StorageFamily>::Value<'a>: RefUnwindSafe,
impl<'a, F> Send for KeyValue<'a, F>
impl<'a, F> Sync for KeyValue<'a, F>
impl<'a, F> Unpin for KeyValue<'a, F>
impl<'a, F> UnwindSafe for KeyValue<'a, F>
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