Crate kay [] [src]

Kay is a high-performance actor system, suitable for simulating millions of entities.

In Kay, actors concurrently send and receive asynchronous messages, but are otherwise completely isloated from each other. Actors can only mutate their own state.

Have a look at Actor, Recipient and Swarm to understand the main abstractions.

Modules

swarm

Tools for dealing with large amounts of identical actors

Structs

ActorSystem

An ActorSystem contains the states of all registered actors, message inboxes (queues) for each registered actor, and message handlers for each registered (Actor,Message) pair.

ID

An ID that uniquely identifies an Actor, or even a SubActor within a Swarm

Packet

Combination of a message and its destination recipient id

Enums

Fate

Return type of message handling functions, signifying if an Actor/SubActor should live on after receiving a certain message type.

Statics

THE_SYSTEM

Global pointer to the singleton instance of ActorSystem. Set by ActorSystem::create_the_system.

Traits

Actor

Any Rust data structure can become an actor by:

Message

Trait that a datastructure must implement in order to be sent and received as a message.

Recipient

Trait with which message handling for Actor/SubActors is implemented