pub enum TokenLiteral {
String(String),
Dimension(Dimension),
Number(f64),
Gradient(GradientLiteral),
Shadow(ShadowLiteral),
Filter(FilterLiteral),
Mask(MaskLiteral),
}Expand description
A literal value held by a token definition.
Variants§
String(String)
A quoted string, e.g. "#f8fafc" or "Inter".
Dimension(Dimension)
A dimensioned number, e.g. (pt)48 or (px)28.
Number(f64)
An unannotated finite number, e.g. 1.05 or 700.
Gradient(GradientLiteral)
A gradient definition built from child stop nodes plus an optional
angle. Gradients have no scalar value; they are carried by this
dedicated literal variant.
Shadow(ShadowLiteral)
A shadow definition built from child layer nodes. Shadows have no
scalar value; they are carried by this dedicated literal variant.
Filter(FilterLiteral)
A filter definition built from child op nodes. Filters have no scalar value; they are carried by this dedicated literal variant.
Mask(MaskLiteral)
A mask definition built from a single shape child node. Masks have no scalar value; they are carried by this dedicated literal variant.
Trait Implementations§
Source§impl Clone for TokenLiteral
impl Clone for TokenLiteral
Source§fn clone(&self) -> TokenLiteral
fn clone(&self) -> TokenLiteral
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 TokenLiteral
impl Debug for TokenLiteral
Source§impl PartialEq for TokenLiteral
impl PartialEq for TokenLiteral
Source§fn eq(&self, other: &TokenLiteral) -> bool
fn eq(&self, other: &TokenLiteral) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TokenLiteral
Auto Trait Implementations§
impl Freeze for TokenLiteral
impl RefUnwindSafe for TokenLiteral
impl Send for TokenLiteral
impl Sync for TokenLiteral
impl Unpin for TokenLiteral
impl UnsafeUnpin for TokenLiteral
impl UnwindSafe for TokenLiteral
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