Trait stylecs::AnyStyleComponent[][src]

pub trait AnyStyleComponent: StyleComponent + Send + Sync + Debug + 'static {
#[must_use]    fn as_any(&self) -> &dyn Any;
#[must_use] fn clone_to_style_component(&self) -> Box<dyn AnyStyleComponent>;
#[must_use] fn merge_with(
        &self,
        other: &dyn AnyStyleComponent
    ) -> Box<dyn AnyStyleComponent>; }

A StyleComponent that can be boxed for storage and cloned.

Required methods

#[must_use]fn as_any(&self) -> &dyn Any[src]

Returns the style component as Any.

#[must_use]fn clone_to_style_component(&self) -> Box<dyn AnyStyleComponent>[src]

Returns boxed clone of the style component.

#[must_use]fn merge_with(
    &self,
    other: &dyn AnyStyleComponent
) -> Box<dyn AnyStyleComponent>
[src]

Returns boxed clone of the style component.

Loading content...

Implementors

impl<T: StyleComponent + Clone> AnyStyleComponent for T[src]

Loading content...