logo

Module bastion::message[][src]

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

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

Allows to respond to questions.

Matches a Msg (as returned by BastionContext::recv or BastionContext::try_recv) with different types.

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

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