Trait Component
pub trait Component: Sized + Default {
const NAME: &'static str;
// Required methods
fn describe() -> Description;
fn from_source(source: &mut dyn Source) -> Result<Self, Error>;
}Expand description
A widget’s props: the struct its instances are made of. Derive it.
Required Associated Constants§
Required Methods§
fn describe() -> Description
fn from_source(source: &mut dyn Source) -> Result<Self, Error>
fn from_source(source: &mut dyn Source) -> Result<Self, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.