Trait stylecs::StyleComponent[][src]

pub trait StyleComponent: Any + Send + Sync + Debug + 'static {
    fn should_be_inherited(&self) -> bool { ... }
fn merge(&self, other: &Self) -> Self
        Self: Clone
, { ... } }

A style component. Implementors can be stored within Style.

Provided methods

fn should_be_inherited(&self) -> bool[src]

Returns whether the component should be inherited. Affects the behavior of Style::merge_with

fn merge(&self, other: &Self) -> Self where
    Self: Clone

Merges self with other, if it makes sense to do so for this type. The default implementation does not merge and just returns a clone of self.

Loading content...


Loading content...