pub enum AnyValue {
    Int(i64),
    Double(f64),
    String(StringValue),
    Boolean(bool),
    Bytes(Vec<u8>),
    ListAny(Vec<AnyValue>),
    Map(OrderMap<Key, AnyValue>),
}
Expand description

Value types for representing arbitrary values in a log record.

Variants§

§

Int(i64)

An integer value

§

Double(f64)

A double value

§

String(StringValue)

A string value

§

Boolean(bool)

A boolean value

§

Bytes(Vec<u8>)

A byte array

§

ListAny(Vec<AnyValue>)

An array of Any values

§

Map(OrderMap<Key, AnyValue>)

A map of string keys to Any values, arbitrarily nested.

Trait Implementations§

source§

impl Clone for AnyValue

source§

fn clone(&self) -> AnyValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AnyValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&'static str> for AnyValue

source§

fn from(val: &'static str) -> AnyValue

Converts to this type from the input type.
source§

impl From<Cow<'static, str>> for AnyValue

source§

fn from(val: Cow<'static, str>) -> AnyValue

Converts to this type from the input type.
source§

impl From<String> for AnyValue

source§

fn from(val: String) -> AnyValue

Converts to this type from the input type.
source§

impl From<StringValue> for AnyValue

source§

fn from(val: StringValue) -> AnyValue

Converts to this type from the input type.
source§

impl From<Value> for AnyValue

source§

fn from(value: Value) -> Self

Converts to this type from the input type.
source§

impl From<bool> for AnyValue

source§

fn from(val: bool) -> AnyValue

Converts to this type from the input type.
source§

impl From<f32> for AnyValue

source§

fn from(val: f32) -> AnyValue

Converts to this type from the input type.
source§

impl From<f64> for AnyValue

source§

fn from(val: f64) -> AnyValue

Converts to this type from the input type.
source§

impl From<i16> for AnyValue

source§

fn from(val: i16) -> AnyValue

Converts to this type from the input type.
source§

impl From<i32> for AnyValue

source§

fn from(val: i32) -> AnyValue

Converts to this type from the input type.
source§

impl From<i64> for AnyValue

source§

fn from(val: i64) -> AnyValue

Converts to this type from the input type.
source§

impl From<i8> for AnyValue

source§

fn from(val: i8) -> AnyValue

Converts to this type from the input type.
source§

impl From<u16> for AnyValue

source§

fn from(val: u16) -> AnyValue

Converts to this type from the input type.
source§

impl From<u32> for AnyValue

source§

fn from(val: u32) -> AnyValue

Converts to this type from the input type.
source§

impl From<u8> for AnyValue

source§

fn from(val: u8) -> AnyValue

Converts to this type from the input type.
source§

impl<K: Into<Key>, V: Into<AnyValue>> FromIterator<(K, V)> for AnyValue

source§

fn from_iter<I: IntoIterator<Item = (K, V)>>(iter: I) -> Self

Creates an AnyValue::Map value from a sequence of key-value pairs that can be converted into a Key and AnyValue respectively.

source§

impl<T: Into<AnyValue>> FromIterator<T> for AnyValue

source§

fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self

Creates an AnyValue::ListAny value from a sequence of Into<AnyValue> values.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.