Struct riker::system::ActorSystem

source ·
pub struct ActorSystem<Msg: Message> {
    pub proto: Arc<ProtoSystem>,
    pub kernel: Option<KernelRef<Msg>>,
    pub event_store: Option<ActorRef<Msg>>,
    pub sys_channels: Option<SysChannels<Msg>>,
    /* private fields */
}
Expand description

The actor runtime and common services coordinator

The ActorSystem provides a runtime on which actors are executed. It also provides common services such as channels, persistence and scheduling. The ActorSystem is the heart of a Riker application, starting serveral threads when it is created. Create only one instance of ActorSystem per application.

Fields§

§proto: Arc<ProtoSystem>§kernel: Option<KernelRef<Msg>>§event_store: Option<ActorRef<Msg>>§sys_channels: Option<SysChannels<Msg>>

Implementations§

Create a new ActorSystem instance

Requires a type that implements the Model trait.

Create a new ActorSystem instance with provided name

Requires a type that implements the Model trait.

Create a new ActorSystem instance bypassing default config behavior

Requires a type that implements the Model trait.

Shutdown the actor system

Attempts a graceful shutdown of the system and all actors. Actors will receive a stop message, executing actor.post_stop.

Does not block. Returns a future which is completed when all actors have successfully stopped.

Returns the system start date

Returns the number of seconds since the system started

Returns the hostname used when the system started

The host is used in actor addressing.

Currently not used, but will be once system clustering is introduced.

Returns the UUID assigned to the system

Returns the name of the system

Returns the user root actor reference

Returns the system root actor reference

Reutrns the temp root actor reference

Returns a reference to the default stream channel

Returns a reference to the event stream channel

Returns a reference to the dead letters channel

Returns a reference to the IO Manager

Returns the Config used by the system

Create an actor under the system root

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.