Module message

Source
Expand description

Dynamic dispatch oriented messaging system

This system allows:

  • Generic communication between mailboxes.
  • All message communication relies on at-most-once delivery guarantee.
  • Messages are not guaranteed to be ordered, all message’s order is causal.

Structs§

Answer
A Future returned when successfully “asking” a message using ChildRef::ask_anonymously and which resolves to a Result<Msg, ()> where the Msg is the message answered by the child (see the [msg!] macro for more information).
AnswerSender
Allows to respond to questions.
MessageHandler
Matches a Msg (as returned by BastionContext::recv or BastionContext::try_recv) with different types.
Msg
A message returned by BastionContext::recv or BastionContext::try_recv that should be passed to the [msg!] macro to try to match what its real type is.

Traits§

Message
A trait that any message sent needs to implement (it is already automatically implemented but forces message to implement the following traits: Any, Send, Sync and Debug).