module Rooibos::Shortcuts::Msg
Short aliases for Message types.
App developers pattern-match against message types frequently. The full names (Rooibos::Message::HttpResponse) are verbose. These shortcuts save characters and improve readability.
Example
case message in Msg::Timer[envelope: :dismiss] [model.with(notification: nil), nil] in Msg::Http[status: 200, body:] [model.with(data: JSON.parse(body)), nil] in Msg::Sh::Batch[status: 0, stdout:] [model.with(output: stdout), nil] end
Constants
- All
-
Aggregated parallel results. Alias for
Message::All. - Batch
-
Batchcompletion signal. Alias forMessage::Batch. - Http
-
HTTP response message type. Alias for
Message::HttpResponse. - Timer
-
Timermessage type. Alias forMessage::Timer.