Enum sauron_core::html::attributes::Value[][src]

pub enum Value {
Show 19 variants Bool(bool), Str(&'static str), String(String), Vec(Vec<Value>), 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>),
}
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 value

Tuple Fields of Bool

0: bool
Str

&’static str value

Tuple Fields of Str

0: &'static str
String

String value

Tuple Fields of String

0: String
Vec

a vec of values

Tuple Fields of Vec

0: Vec<Value>
U8

u8 value

Tuple Fields of U8

0: u8
U16

u16 value

Tuple Fields of U16

0: u16
U32

u32 value

Tuple Fields of U32

0: u32
U64

u64 value

Tuple Fields of U64

0: u64
Usize

usize value

Tuple Fields of Usize

0: usize
U128

u128 value

Tuple Fields of U128

0: u128
I8

i8 value

Tuple Fields of I8

0: i8
I16

i16 value

Tuple Fields of I16

0: i16
I32

i32 value

Tuple Fields of I32

0: i32
I64

i64 value

Tuple Fields of I64

0: i64
I128

i128 value

Tuple Fields of I128

0: i128
Isize

isize value

Tuple Fields of Isize

0: isize
F32

f32 value

Tuple Fields of F32

0: f32
F64

f64 value

Tuple Fields of F64

0: f64
Bytes

bytes value

Tuple Fields of Bytes

0: Vec<u8>

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.