pub struct TokenEntry {
pub name: String,
pub value: String,
pub dark_value: Option<String>,
pub type_hint: Option<String>,
pub description: Option<String>,
}Expand description
A single design token entry.
Fields§
§name: StringCSS variable name without leading -- (e.g. moss-color-accent).
value: StringCSS value as a string (e.g. #2d5a2d, 1.125rem, var(--moss-content-width)).
When $value is an object with "light" and "dark" keys, this holds the light value.
dark_value: Option<String>Dark-mode CSS value. None when $value is a plain string (light-only token).
Some(...) when $value is { "light": "...", "dark": "..." }.
type_hint: Option<String>Optional W3C $type hint (color, dimension, fontFamily, number).
description: Option<String>Optional human-readable description.
Trait Implementations§
Source§impl Clone for TokenEntry
impl Clone for TokenEntry
Source§fn clone(&self) -> TokenEntry
fn clone(&self) -> TokenEntry
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 TokenEntry
impl Debug for TokenEntry
impl Eq for TokenEntry
Source§impl PartialEq for TokenEntry
impl PartialEq for TokenEntry
impl StructuralPartialEq for TokenEntry
Auto Trait Implementations§
impl Freeze for TokenEntry
impl RefUnwindSafe for TokenEntry
impl Send for TokenEntry
impl Sync for TokenEntry
impl Unpin for TokenEntry
impl UnsafeUnpin for TokenEntry
impl UnwindSafe for TokenEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.