pub enum PropertyValue {
TokenRef(String),
Literal(String),
Dimension(Dimension),
DataRef(String),
}Expand description
A property value that is either a token reference or a raw literal string.
Variants§
TokenRef(String)
A reference to a design token, e.g. (token)"color.text.primary".
Literal(String)
A raw literal value stored as a string (e.g. a hex color "#ff0000").
Dimension(Dimension)
A literal dimension with an explicit unit, e.g. (px)24 or (pt)13.
DataRef(String)
A typed reference to a runtime data field, e.g. (data)"revenue.total".
Trait Implementations§
Source§impl Clone for PropertyValue
impl Clone for PropertyValue
Source§fn clone(&self) -> PropertyValue
fn clone(&self) -> PropertyValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PropertyValue
impl Debug for PropertyValue
Source§impl PartialEq for PropertyValue
impl PartialEq for PropertyValue
Source§fn eq(&self, other: &PropertyValue) -> bool
fn eq(&self, other: &PropertyValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PropertyValue
Auto Trait Implementations§
impl Freeze for PropertyValue
impl RefUnwindSafe for PropertyValue
impl Send for PropertyValue
impl Sync for PropertyValue
impl Unpin for PropertyValue
impl UnsafeUnpin for PropertyValue
impl UnwindSafe for PropertyValue
Blanket Implementations§
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