Struct Tokens
pub struct Tokens {Show 19 fields
pub colors: Colors,
pub typography: Typography,
pub spacing: Spacing,
pub metrics: Metrics,
pub radii: Radii,
pub elevation: Elevation,
pub motion: Motion,
pub font_mono: FontFamily,
pub terminal_palette: TerminalPalette,
pub syntax: SyntaxPalette,
pub motion_character: f32,
pub selector: SelectorFinish,
pub density: Density,
pub finishes: RoleFinishes,
pub border: Border,
pub border_color: Option<AlphaColor<Srgb>>,
pub depth: Depth,
pub response: Response,
pub icon_stroke_px: f32,
}Fields§
§colors: Colors§typography: Typography§spacing: Spacing§metrics: MetricsControl heights, hit targets, panel widths and icon sizes (HIG §9.6).
radii: Radii§elevation: Elevation§motion: Motion§font_mono: FontFamilyCanonical monospace font handle. Derived from typography.mono_family
on construction; consumers should prefer this over the raw string so
future fallback lists/weights can be added without breaking call sites.
terminal_palette: TerminalPalettePalette for terminal-style widgets (fg/bg defaults + ANSI 0..=15).
syntax: SyntaxPaletteThe one syntax-highlighting palette every code surface paints with.
motion_character: f32Authored UI-spring character. 1 is stock. Stored beside the springs
it produces, because calm and lively are not separable from stiffness
alone.
selector: SelectorFinishWhat a docked selector strip stands on and how its items are lit
(crate::chrome::paint_selector).
density: DensityThe density these tokens are at; crate::Theme::with_density
moves it.
finishes: RoleFinishesWhat each surface role is made of, as authored (the painters ask
crate::Theme::finish, which applies reduced transparency).
border: BorderHow surfaces are outlined.
border_color: Option<AlphaColor<Srgb>>The colour the border is drawn in, resolved from its ink by the
theme; None where surfaces keep the design language’s hairlines.
depth: DepthHow surfaces stand off what is below them; the elevation above is already this depth’s.
response: ResponseHow the shared components answer the pointer: hover and press
(Response).
icon_stroke_px: f32How wide an icon’s outline is drawn, in logical pixels: the theme’s
icons role (docs/architecture/theming.md, “Icons”). 1.5 at
stock, Lucide’s own weight; a look with pixels wants a whole-pixel
stroke it can land on.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Tokens
Auto Trait Implementations§
impl Freeze for Tokens
impl !RefUnwindSafe for Tokens
impl Send for Tokens
impl Sync for Tokens
impl Unpin for Tokens
impl UnsafeUnpin for Tokens
impl !UnwindSafe for Tokens
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more