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§
sourcefn into_component(self) -> Component
fn into_component(self) -> Component
Returns this type, wrapped in a Component
.
sourcefn try_from_component(component: Component) -> Result<Self, Component>
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.