pub struct StyleSheet {
pub motion: Vec<MotionToken>,
pub rules: Vec<StyleRule>,
pub transitions: Vec<TransitionDef>,
pub patterns: Vec<PatternDef>,
pub accents: Vec<AccentDef>,
pub text_weights: Vec<TextWeight>,
pub corners: Vec<CornerDef>,
}Fields§
§motion: Vec<MotionToken>Every motion token: the built-in ones, then the application’s own.
rules: Vec<StyleRule>§transitions: Vec<TransitionDef>Every transition: the built-in ones, then the application’s own.
patterns: Vec<PatternDef>Patterns Pattern(name:) tiles over a canvas.
accents: Vec<AccentDef>Accent colors the application chooses among at run time with
WindowSet(accent:).
text_weights: Vec<TextWeight>The weights the application gives text styles, such as a heavy
large_title; the sizes stay the platform’s.
corners: Vec<CornerDef>Named corner radii (corner { card: 22 }) in declaration order:
the values for every platform, then those of #[target(…)] blocks.
Implementations§
Source§impl StyleSheet
impl StyleSheet
pub fn token(&self, name: &str) -> Option<&MotionToken>
Sourcepub fn accent(&self, name: &str) -> Option<&AccentDef>
pub fn accent(&self, name: &str) -> Option<&AccentDef>
The accent named like an enum variant: Crimson and crimson
name the same accent.
pub fn pattern(&self, name: &str) -> Option<&PatternDef>
pub fn transition(&self, name: &str) -> Option<&TransitionDef>
Trait Implementations§
Source§impl Clone for StyleSheet
impl Clone for StyleSheet
Source§impl Debug for StyleSheet
impl Debug for StyleSheet
Source§impl Default for StyleSheet
impl Default for StyleSheet
Source§impl<'de> Deserialize<'de> for StyleSheet
impl<'de> Deserialize<'de> for StyleSheet
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StyleSheet
impl PartialEq for StyleSheet
Source§impl Serialize for StyleSheet
impl Serialize for StyleSheet
impl StructuralPartialEq for StyleSheet
Auto Trait Implementations§
impl Freeze for StyleSheet
impl RefUnwindSafe for StyleSheet
impl Send for StyleSheet
impl Sync for StyleSheet
impl Unpin for StyleSheet
impl UnsafeUnpin for StyleSheet
impl UnwindSafe for StyleSheet
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