Module mogwai::relay[][src]

Expand description

Bundling view updates and events.

Views are sometimes very complex. Many times we either have to manage a large number of channels or a small number of channels that send messages with many enum variants. Both cases can become overwhelming.

To help with this situation mogwai >= 0.5.2 has introduced the concept of view “relays”. A view relay is an object that uses inputs and outputs to manage communicating updates and events to and from a view. Instead of having to know the intricacies of a number of different channels and their operating behavior, the library user creates a struct that defines inputs and outputs and uses those to construct a ViewBuilder. Updates to the view are then made by interacting with the relay struct asyncronously from within a logic loop.

Structs

An input to a view.

An event output from a view.

Traits

Marker trait to aid in writing relays.

Marker trait to aid in writing relays.