Expand description
Message-passing abstractions to make working with channels and actors a more seamless experience.
See GitHub for more information.
Macros§
Structs§
- Boxed
Payload - Holds a
MessageSpecifier::Payload - DynInbox
- A dynamic inbox that can accept messages of any type, as long as they are part of the specified set.
- Fire
AndForget - A marker type for fire-and-forget messages.
- Flume
Inbox - A wrapper around a
flume::Senderthat acts as aPolyBox. - Halted
- This process has been halted and should now exit.
- Request
- A marker type for request messages.
- Rx
- The receiver part of a request, created with
new_request. - RxError
- Error returned when receiving a message using an
Rx. - Send
Error - The channel has been closed, and no longer accepts new messages.
- Set
- Marker struct to act as a set of elements.
- Tokio
Inbox - A wrapper around a
tokio::sync::mpsc::Senderthat acts as aPolyBox. - Tx
- The transmitter part of a request, created with
new_request. - TxError
- Error returned when sending a message using a
Tx.
Enums§
- Recv
Error - Error returned when receiving a message.
- Request
Error - Error returned when sending a request.
- Send
Checked Error - Error returned when sending a message, checking at compile-time that the message is actually accepted by the actor.
- TryRecv
Error - Error returned when trying to receive a message.
- TryRequest
Error - Error returned when trying to send a request.
- TryRx
Error - Error returned when trying to receive a message using an
Rx. - TrySend
Checked Error - Error returned when trying to send a message, checking at compile-time that the message is actually accepted by the actor.
- TrySend
Error - An error returned when trying to send a message.
Traits§
- AsSet
- Trait that allows usage of custom types instead of [
Set]. - Contains
- Implemented if a set contains the element
E. - DynPoly
Box - Object-safe sub-trait of
PolyBox, allowing for dynamic dispatch. - From
Payload - Interface
- An interface defines the set of messages that can be sent to a given actor.
This is usually derived on an enum using the
#[derive(Interface)]macro. - Members
- Trait to get the members (type-ids) of a set.
- Message
- A trait that must be implemented for all types that are sent as messages.
- Message
Ext - A trait that extends
Messagewith some helper methods. - Message
Reply - A trait for types that can be used as the output of a
Message. - Message
Specifier - A trait for types that can be used to specify the kind of a
Message. - PolyBox
- A trait that allows for conversions to
DynInbox. - Polybox
Ext - A trait that extends
PolyBoxwith some helper methods. - Sends
- Implemented for inboxes that can send messages of type
T. - Sends
Ext - Extension trait for
Sends. - TryInto
Payload
Functions§
- new_
request - Create a new request, consisting of a
Tx<T>and anRx<T>. TheTx(transmitter) can be used to send a single messageTto theRx(receiver).
Type Aliases§
- Output
- A helper type for the output of a
Message. - Payload
- A helper type for the payload of a
Message. - Reply
- A helper type for the reply of a
Message.