Struct relm::Relm [] [src]

pub struct Relm<MSG: Clone + DisplayVariant> { /* fields omitted */ }

Handle connection of futures to send messages to the update() and update_command() methods.

Methods

impl<MSG: Clone + DisplayVariant + Send + 'static> Relm<MSG>
[src]

Connect a Future or a Stream called to_stream to send the message success_callback in case of success and failure_callback in case of failure.

Note

This function does not spawn the future. You'll usually want to use Relm::connect_exec() to both connect and spawn the future.

Warning

This function must be executed of the tokio thread, i.e. in the subscriptions() or update_command() methods.

This function is the same as Relm::connect() except it does not take a failure_callback; hence, it ignores the errors.

Warning

This function must be executed of the tokio thread, i.e. in the subscriptions() or update_command() methods.

Connect the future to_stream and spawn it on the tokio main loop.

Warning

This function must be executed of the tokio thread, i.e. in the subscriptions() or update_command() methods.

Connect the future to_stream and spawn it on the tokio main loop, ignoring any error.

Warning

This function must be executed of the tokio thread, i.e. in the subscriptions() or update_command() methods.

Spawn a future in the tokio event loop.

Warning

This function must be executed of the tokio thread, i.e. in the subscriptions() or update_command() methods.

Get a handle to the tokio event loop.

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