[][src]Crate xtra

Structs

ActorManager

A manager for the actor which handles incoming messages and stores the context. Its managing loop can be started with ActorManager::manage.

Address

An Address is a reference to an actor through which Messages can be sent. It can be cloned, and when all Addresses are dropped, the actor will be stopped. It is created by calling the Actor::start or Actor::spawn methods.

Context

Context is used to signal things to the ActorManager's management loop. Currently, it can be used to stop the actor (Context::stop).

Disconnected

The actor is no longer running and disconnected

Traits

Actor

An actor which can handle Messages one at a time. Actors can only be communicated with by sending Messages through their Addressess. They can modify their private state, respond to messages, and spawn other actors. They can also stop themselves through their Context by calling Context::stop. This will result in any attempt to send messages to the actor in future failing.

AsyncHandler

A trait indicating that an Actor can handle a given Message asynchronously, and the logic to handle the message.

Handler

A trait indicating that an Actor can handle a given Message synchronously, and the logic to handle the message.

Message

A message that can be sent to an Actor for processing. They are processed one at a time. Only actors implementing the corresponding Handler<M> trait can be sent a given message.