Enum sauron_core::html::attributes::Value
source · [−]pub enum Value {
}
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
Vec(Vec<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>)
bytes value
Implementations
sourceimpl Value
impl Value
sourcepub fn as_str(&self) -> Option<&str>
pub fn as_str(&self) -> Option<&str>
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.
sourcepub fn as_bytes(&self) -> Option<&[u8]>
pub fn as_bytes(&self) -> Option<&[u8]>
returns the reference to the bytes if this is a Bytes
variant
Trait Implementations
sourceimpl<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>,
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>,
sourceimpl<T, U, V, X> From<(T, U, V, X)> for Value where
T: Into<Value>,
U: Into<Value>,
V: Into<Value>,
X: 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>,
impl StructuralPartialEq for Value
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more