pub struct Arbiter { /* fields omitted */ }
An event loop controller.
An arbiter controls the event loop in its thread. Each arbiter
runs in a separate thread and provides several methods for event
loop access. Each arbiter can belong to a specific System
actor.
By default, a panic in an arbiter does not stop the rest of the
system, unless the panic is in the system actor. Users of an
arbiter can opt into shutting down the system on panic by using
Arbiter::builder()
and enabling stop_system_on_panic
.
Returns a builder object for customized arbiter creation.
Spawns a new thread and runs the event loop in the spawned thread.
Returns the address of the newly created arbiter. Does not
stop the system on panic.
Returns current arbiter's name
Returns the current arbiter's address.
Returns the arbiter's registry,
Executes a future on the current thread.
Executes a lazily constructed future on the current thread.
The provided closure is run as part of future execution. After
it returns, execution will continue with the future created by
the closure.
Starts an actor inside a newly created arbiter.
Returns the address of the actor created.
Actor execution context type
Called when an actor gets polled the first time.
Called after an actor is in Actor::Stopping
state. Read more
Start a new asynchronous actor, returning its address. Read more
Construct and start a new asynchronous actor, returning its address. Read more
Start a new asynchronous actor given a Context
. Read more
The type of value that this handler will return.
This method is called for every message received by this actor.
The type of value that this handler will return.
This method is called for every message received by this actor.
The type of value that this handler will return.
This method is called for every message received by this actor.
Executes the destructor for this type. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static