pub struct ThemeSnapshot {
pub tokens: DesignTokens,
pub typography: TypographyScale,
pub palette: Palette,
pub body_font: FontSpec,
}Expand description
A serializable snapshot of the design-token, typography, palette, and font layers of a theme.
This is the primary type persisted by serialize_theme /
deserialize_theme. All fields round-trip faithfully through the
oxicode binary format.
Fields§
§tokens: DesignTokensDesign tokens (spacing / radius / elevation / opacity).
typography: TypographyScaleTypographic scale (six named text-style roles).
palette: PaletteSemantic colour palette for this theme.
body_font: FontSpecBody font specification.
Trait Implementations§
Source§impl Clone for ThemeSnapshot
impl Clone for ThemeSnapshot
Source§fn clone(&self) -> ThemeSnapshot
fn clone(&self) -> ThemeSnapshot
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 ThemeSnapshot
impl Debug for ThemeSnapshot
Source§impl Decode for ThemeSnapshot
impl Decode for ThemeSnapshot
Source§impl Default for ThemeSnapshot
impl Default for ThemeSnapshot
Source§fn default() -> ThemeSnapshot
fn default() -> ThemeSnapshot
Returns the “default value” for a type. Read more
Source§impl Encode for ThemeSnapshot
impl Encode for ThemeSnapshot
Source§impl PartialEq for ThemeSnapshot
impl PartialEq for ThemeSnapshot
Source§fn eq(&self, other: &ThemeSnapshot) -> bool
fn eq(&self, other: &ThemeSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ThemeSnapshot
Auto Trait Implementations§
impl Freeze for ThemeSnapshot
impl RefUnwindSafe for ThemeSnapshot
impl Send for ThemeSnapshot
impl Sync for ThemeSnapshot
impl Unpin for ThemeSnapshot
impl UnsafeUnpin for ThemeSnapshot
impl UnwindSafe for ThemeSnapshot
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<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>
Converts
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>
Converts
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