[−][src]Enum sauron_core::html::attributes::Value
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 value
Implementations
impl Value
[src]
pub fn as_str(&self) -> Option<&str>
[src]
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.
pub fn as_bool(&self) -> Option<bool>
[src]
returns the bool value if this a Bool variant
pub fn as_bytes(&self) -> Option<&[u8]>
[src]
returns the reference to the bytes if this is a Bytes
variant
pub fn as_f64(&self) -> Option<f64>
[src]
converts to f64 if the variants are numerical representation
pub fn append(&mut self, new_value: Value)
[src]
If this is Value::Vec variant, append the new value
otherwise, turn this value into Value::Vec(Vec
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl Display for Value
[src]
impl<'_> From<&'_ [u8]> for Value
[src]
impl<'_> From<&'_ String> for Value
[src]
impl<'_> From<&'_ Vec<u8>> for Value
[src]
impl From<&'static str> for Value
[src]
impl<T> From<[T; 1]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 10]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 11]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 12]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 2]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 3]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 4]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 5]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 6]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 7]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 8]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T> From<[T; 9]> for Value where
T: Into<Value> + Clone,
[src]
T: Into<Value> + Clone,
impl<T, U, V, X, Z> From<(T, U, V, X, Z)> for Value where
T: Into<Value>,
U: Into<Value>,
V: Into<Value>,
X: Into<Value>,
Z: Into<Value>,
[src]
T: Into<Value>,
U: Into<Value>,
V: Into<Value>,
X: Into<Value>,
Z: Into<Value>,
impl<T, U, V, X> From<(T, U, V, X)> for Value where
T: Into<Value>,
U: Into<Value>,
V: Into<Value>,
X: Into<Value>,
[src]
T: Into<Value>,
U: Into<Value>,
V: Into<Value>,
X: Into<Value>,
impl<T, U, V> From<(T, U, V)> for Value where
T: Into<Value>,
U: Into<Value>,
V: Into<Value>,
[src]
T: Into<Value>,
U: Into<Value>,
V: Into<Value>,
impl<T, U> From<(T, U)> for Value where
T: Into<Value>,
U: Into<Value>,
[src]
T: Into<Value>,
U: Into<Value>,
impl From<String> for Value
[src]
impl From<Vec<u8>> for Value
[src]
impl From<bool> for Value
[src]
impl From<f32> for Value
[src]
impl From<f64> for Value
[src]
impl From<i128> for Value
[src]
impl From<i16> for Value
[src]
impl From<i32> for Value
[src]
impl From<i64> for Value
[src]
impl From<i8> for Value
[src]
impl From<isize> for Value
[src]
impl From<u128> for Value
[src]
impl From<u16> for Value
[src]
impl From<u32> for Value
[src]
impl From<u64> for Value
[src]
impl From<u8> for Value
[src]
impl From<usize> for Value
[src]
impl PartialEq<Value> for Value
[src]
impl StructuralPartialEq for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,