rustmotion-core 0.6.0

Core types, traits, and rendering utilities for rustmotion
1
2
3
4
5
6
7
8
9
10
11
12
use crate::css::CssStyle;

/// Object-safe trait for components that carry a `CssStyle`.
/// Used by the box-tree builder to read styling.
pub trait Styled {
    fn style_config(&self) -> &CssStyle;
}

/// Mutable access to style config.
pub trait StyledMut: Styled {
    fn style_config_mut(&mut self) -> &mut CssStyle;
}