Struct tonari_actor::System[][src]

pub struct System { /* fields omitted */ }
Expand description

Systems are responsible for keeping track of their spawned actors, and managing their lifecycles appropriately.

You may run multiple systems in the same application, each system being responsible for its own pool of actors.

Implementations

Creates a new System with a given name.

Prepare an actor to be spawned. Returns a SpawnBuilder which can be used to customize the spawning of the actor.

Similar to prepare, but an actor factory is passed instead of an Actor itself. This is used when an actor needs to be created on its own thread instead of the calling thread. Returns a SpawnBuilder which can be used to customize the spawning of the actor.

Spawn a normal Actor in the system, returning its address when successful.

Block the current thread until the system is shutdown.

Methods from Deref<Target = SystemHandle>

Stops all actors spawned by this system.

Trait Implementations

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.