pub trait DesignSystem {
// Required methods
fn info() -> &'static DesignSystemInfo;
fn tokens() -> &'static DesignTokenSet;
fn components() -> &'static [DesignComponentSpec];
fn patterns() -> &'static [DesignPatternSpec];
fn assets() -> &'static DesignAssetManifest;
fn theme_ref(mode: DesignMode) -> &'static Theme;
// Provided methods
fn font_faces() -> &'static [PackagedFont] { ... }
fn theme(mode: DesignMode) -> Theme { ... }
}Required Methods§
fn info() -> &'static DesignSystemInfo
fn tokens() -> &'static DesignTokenSet
fn components() -> &'static [DesignComponentSpec]
fn patterns() -> &'static [DesignPatternSpec]
fn assets() -> &'static DesignAssetManifest
fn theme_ref(mode: DesignMode) -> &'static Theme
Provided Methods§
Sourcefn font_faces() -> &'static [PackagedFont]
fn font_faces() -> &'static [PackagedFont]
Font faces packaged with this design system.
Hosts register these faces with their text measurer and renderer before the first frame so declared weight, style, and variation axes are used consistently instead of synthesized fallbacks.
fn theme(mode: DesignMode) -> Theme
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".