#[non_exhaustive]pub enum Value {
}Expand description
A resource or attribute value.
References may be symbolic (ResourceRef::Named) while building; they
are resolved to IDs when encoded. Decoded values always carry IDs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
String(String)
Bool(bool)
Int(i32)
A decimal integer (TYPE_INT_DEC); also used for enum attributes.
Hex(u32)
A hexadecimal integer (TYPE_INT_HEX); also used for flag attributes.
Float(f32)
Dimension(Dimension)
Fraction(Fraction)
Color(Color)
Reference(ResourceRef)
@type/name: the value of another resource.
Attribute(ResourceRef)
?type/name: the value of a theme attribute.
Null
@null: no resource, which clears an attribute (a reference to ID 0).
Empty
@empty: an explicitly empty value.
Raw
A value type this crate does not interpret, kept verbatim.
Implementations§
Trait Implementations§
Source§impl From<ResourceRef> for Value
impl From<ResourceRef> for Value
Source§fn from(r: ResourceRef) -> Self
fn from(r: ResourceRef) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more