Crate tokactor

Source

Modules§

util

Structs§

ActorRef
Hold a local address to a running actor that can use to send messages to the running actor. The message will be processed at some point in the future.
AnonymousRef
Address for one off actors that support asyncrous tasks. Instead of holding a MPSC channel, we hold the actual handle to the tokio task join handle.
Ctx
General context for actors written
TcpRequest
World
WorldBuilder

Enums§

AskError
Errors when attempting to ask an actor about a question failed.
AskResult
IntoFutureError
Errors that can occur if the supervios actor dies while awaiting for the child actors to finish they panic.
Scheduler
SendError
Errors when sending a message failed

Traits§

Actor
User implemented actor. The user must inheriate this trait so that we can control the execution of the actors struct.
ActorContext
Ask
Ask an actor to handle a message but also return a response. Asking is an optimization to be able to handle two operations at once.
AsyncAsk
Ask an actor to recieve a message and respond back. The respond is expected to be some type of async operation and thus is executed by a anonymous actor that takes one messages and handles it.
Handler
Handler is able to be programmed to handle certian messages. When executing it can answer messages or it can forward them to new actors. Special care must be taken when forwarding a message from an actor. When forwarding, a user can return None.
Message
The message that an actor can handle.

Type Aliases§

DeadActorResult
A dead actor must be handled by a supervisor. The death of an actor could be because it completed executing or it paniced/cancelled during execution.
WorldResult