Enum sauron::prelude::Value[][src]

pub enum Value {
Show 19 variants Bool(bool), Str(&'static str), String(String), Vec(Vec<Value, Global>), U8(u8), U16(u16), U32(u32), U64(u64), Usize(usize), U128(u128), I8(i8), I16(i16), I32(i32), I64(i64), I128(i128), Isize(isize), F32(f32), F64(f64), Bytes(Vec<u8, Global>),
}
Expand description

TODO: merge this with AttributeValue Value is an abstraction of the values used in the actual backend. Html and gtk-rs have different set of compatible values therefore a need for a storage of these intermediate value is needed

Variants

Bool(bool)

bool value

Str(&'static str)

&’static str value

String(String)

String value

a vec of values

U8(u8)

u8 value

U16(u16)

u16 value

U32(u32)

u32 value

U64(u64)

u64 value

Usize(usize)

usize value

U128(u128)

u128 value

I8(i8)

i8 value

I16(i16)

i16 value

I32(i32)

i32 value

I64(i64)

i64 value

I128(i128)

i128 value

Isize(isize)

isize value

F32(f32)

f32 value

F64(f64)

f64 value

Bytes(Vec<u8, Global>)

bytes value

Implementations

returns an &str reference if this value is Str or String variant Note: This doesn’t convert other variant into str representation Use the to_string() for that.

returns the bool value if this a Bool variant

returns the reference to the bytes if this is a Bytes variant

converts to f64 if the variants are numerical representation

If this is Value::Vec variant, append the new value otherwise, turn this value into Value::Vec(Vec) variant and append the new value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.