pub trait CustomWidget: Sized + 'static {
type Props: Clone + PartialEq + Debug + 'static;
type Event: Clone + PartialEq + Debug + 'static;
const NAME: &'static str;
// Required method
fn a11y(props: &Self::Props) -> A11yProps;
// Provided method
fn action(props: &Self::Props, action: &A11yAction) -> Option<Self::Event> { ... }
}Expand description
The shared, platform-free definition of a custom widget.
Required Associated Constants§
Required Associated Types§
type Props: Clone + PartialEq + Debug + 'static
type Event: Clone + PartialEq + Debug + 'static
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".