[][src]Module bastion::message

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 and which resolves to a Result<Msg, ()> where the Msg is the message answered by the child (see the msg! macro for more information).

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