pub trait Transmogrifier<F>: Debug where
    F: Frontend
{ type Widget: Widget; type State: Default + Debug + Any + Send + Sync; fn initialize(
        &self,
        widget: &mut Self::Widget,
        reference: &WidgetRef<Self::Widget>,
        frontend: &F
    ) -> Self::State { ... } fn receive_command(
        &self,
        command: <Self::Widget as Widget>::Command,
        context: &mut TransmogrifierContext<'_, Self, F>
    ) { ... } fn process_messages(
        &self,
        transmogrifier_context: TransmogrifierContext<'_, Self, F>
    ) { ... } fn default_state_for(
        &self,
        widget: &mut Self::Widget,
        reference: &WidgetRef<Self::Widget>,
        frontend: &F
    ) -> TransmogrifierState { ... } fn widget_type_id(&self) -> TypeId { ... } }
Expand description

Transforms a Widget into whatever is needed for Frontend F.

Required Associated Types

The type of the widget being transmogrified.

The type the storage this transmogrifier uses for state.

Provided Methods

Called after a transmogrifier is initialized.

Called when a command is received from the widget.

Processes commands and events for this widget and transmogrifier.

Returns an initialized state using Self::State::default().

Returns the TypeId of Self::Widget.

Implementors