Enum Value
pub enum Value<'a> {
String(&'a str),
Formatted(Arguments<'a>),
Bool(bool),
I64(i64),
F64(f64),
}Expand description
A transient value that can be stored in a telemetry attribute.
This enum represents values that may contain non-Send types like format_args!,
making them suitable for local use but not for sending across threads.
§Examples
use veecle_telemetry::protocol::transient::Value;
// Create values of different types
let text = Value::String("hello world");
let number = Value::I64(42);
let flag = Value::Bool(true);
let rating = Value::F64(4.5);Variants§
String(&'a str)
A string value
Formatted(Arguments<'a>)
A format_args! call.
Bool(bool)
A boolean value
I64(i64)
A 64-bit signed integer
F64(f64)
A 64-bit floating-point number
Trait Implementations§
§impl<'a> Serialize for Value<'a>
impl<'a> Serialize for Value<'a>
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> !Send for Value<'a>
impl<'a> !Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
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