Struct relm::Component [] [src]

#[must_use]
pub struct Component<MODEL, MSG: Clone + DisplayVariant, WIDGET> { /* fields omitted */ }

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

Warning

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).

Methods

impl<MODEL, MSG: Clone + DisplayVariant, WIDGET> Component<MODEL, MSG, WIDGET>
[src]

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

Trait Implementations

impl<MODEL: Clone, MSG: Clone + Clone + DisplayVariant, WIDGET: Clone> Clone for Component<MODEL, MSG, WIDGET>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<MODEL, MSG: Clone + DisplayVariant, WIDGET> Drop for Component<MODEL, MSG, WIDGET>
[src]

A method called when the value goes out of scope. Read more

impl<MODEL, MSG: Clone + DisplayVariant, WIDGET: ContainerExt> ContainerExt for Component<MODEL, MSG, WIDGET>
[src]