[][src]Struct log::kv::Value

pub struct Value<'v> { /* fields omitted */ }

A value in a structured key-value pair.

Implementations

impl<'v> Value<'v>[src]

pub fn from_fill<T>(value: &'v T) -> Self where
    T: Fill + 'static, 
[src]

Get a value from a fillable slot.

impl<'v> Value<'v>[src]

pub fn to_str(&self) -> Option<Cow<str>>[src]

Try get a usize from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones. If the serialization implementation produces a short lived string it will be allocated.

impl<'v> Value<'v>[src]

pub fn to_usize(&self) -> Option<usize>[src]

Try get a usize from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_u8(&self) -> Option<u8>[src]

Try get a u8 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_u16(&self) -> Option<u16>[src]

Try get a u16 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_u32(&self) -> Option<u32>[src]

Try get a u32 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_u64(&self) -> Option<u64>[src]

Try get a u64 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_isize(&self) -> Option<isize>[src]

Try get a isize from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_i8(&self) -> Option<i8>[src]

Try get a i8 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_i16(&self) -> Option<i16>[src]

Try get a i16 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_i32(&self) -> Option<i32>[src]

Try get a i32 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_i64(&self) -> Option<i64>[src]

Try get a i64 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_f32(&self) -> Option<f32>[src]

Try get a f32 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_f64(&self) -> Option<f64>[src]

Try get a f64 from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_bool(&self) -> Option<bool>[src]

Try get a bool from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_char(&self) -> Option<char>[src]

Try get a char from this value.

This method is cheap for primitive types, but may call arbitrary serialization implementations for complex ones.

pub fn to_borrowed_str(&self) -> Option<&str>[src]

Try get a str from this value.

This method is cheap for primitive types. It won't allocate an owned String if the value is a complex type.

impl<'v> Value<'v>[src]

pub fn from_debug<T>(value: &'v T) -> Self where
    T: Debug + 'static, 
[src]

Get a value from a debuggable type.

pub fn from_display<T>(value: &'v T) -> Self where
    T: Display + 'static, 
[src]

Get a value from a displayable type.

impl<'v> Value<'v>[src]

pub fn from_sval<T>(value: &'v T) -> Self where
    T: Value + 'static, 
[src]

Get a value from a structured type.

Trait Implementations

impl<'v> Debug for Value<'v>[src]

impl<'v> Display for Value<'v>[src]

impl<'v> From<&'v str> for Value<'v>[src]

impl<'v> From<Arguments<'v>> for Value<'v>[src]

impl<'v> From<bool> for Value<'v>[src]

impl<'v> From<char> for Value<'v>[src]

impl<'v> From<f32> for Value<'v>[src]

impl<'v> From<f64> for Value<'v>[src]

impl<'v> From<i16> for Value<'v>[src]

impl<'v> From<i32> for Value<'v>[src]

impl<'v> From<i64> for Value<'v>[src]

impl<'v> From<i8> for Value<'v>[src]

impl<'v> From<isize> for Value<'v>[src]

impl<'v> From<u16> for Value<'v>[src]

impl<'v> From<u32> for Value<'v>[src]

impl<'v> From<u64> for Value<'v>[src]

impl<'v> From<u8> for Value<'v>[src]

impl<'v> From<usize> for Value<'v>[src]

impl<'v> ToValue for Value<'v>[src]

impl<'v> Value for Value<'v>[src]

Auto Trait Implementations

impl<'v> !RefUnwindSafe for Value<'v>

impl<'v> !Send for Value<'v>

impl<'v> !Sync for Value<'v>

impl<'v> Unpin for Value<'v>

impl<'v> !UnwindSafe for Value<'v>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.