Trait cushy::styles::ComponentDefinition
source · pub trait ComponentDefinition: NamedComponent {
type ComponentType: ComponentType;
// Required method
fn default_value(&self, context: &WidgetContext<'_>) -> Self::ComponentType;
}
Expand description
A type that represents a named component with a default value of a specific Rust type.
Required Associated Types§
sourcetype ComponentType: ComponentType
type ComponentType: ComponentType
The type that will be contained in the Component
.
Required Methods§
sourcefn default_value(&self, context: &WidgetContext<'_>) -> Self::ComponentType
fn default_value(&self, context: &WidgetContext<'_>) -> Self::ComponentType
Returns the default value to use for this component.
Object Safety§
This trait is not object safe.