Struct relm::Component [] [src]

pub struct Component<WIDGET: Widget> { /* fields omitted */ }

Widget that was added by the ContainerWidget::add_widget() method.


You must keep your components as long as you want them to send/receive events. Common practice is to store Components in the Widget struct (see the communication example). The #[widget] attribute takes care of storing them in the struct automatically (see the communication-attribute example).


impl<WIDGET: Widget> Component<WIDGET>


Emit a message of the widget stream.


Get the event stream of the component. This is used internally by the library.


Get the widget of the component.

Trait Implementations

impl<WIDGET: Widget> Clone for Component<WIDGET>


Returns a copy of the value. Read more


Performs copy-assignment from source. Read more

impl<WIDGET: Widget> Drop for Component<WIDGET>


Executes the destructor for this type. Read more

Auto Trait Implementations

impl<WIDGET> Send for Component<WIDGET> where
    <WIDGET as Update>::Msg: Send,
    <WIDGET as Widget>::Root: Send

impl<WIDGET> Sync for Component<WIDGET> where
    <WIDGET as Update>::Msg: Sync,
    <WIDGET as Widget>::Root: Sync