cushy::styles

Trait ComponentType

source
pub trait ComponentType: RequireInvalidation + Sized {
    // Required methods
    fn into_component(self) -> Component;
    fn try_from_component(component: Component) -> Result<Self, Component>;
}
Expand description

A type that can be converted to and from Component.

Required Methods§

source

fn into_component(self) -> Component

Returns this type, wrapped in a Component.

source

fn try_from_component(component: Component) -> Result<Self, Component>

Attempts to extract this type from component. If component does not contain this type, Err(component) is returned.

Object Safety§

This trait is not object safe.

Implementors§