pub struct SyncActorOptions { /* private fields */ }
Expand description

Options for spawning a SyncActor.

Examples

Using the default options.

use heph_rt::spawn::SyncActorOptions;

let opts = SyncActorOptions::default();

Setting the name of the thread that runs the synchronous actor.

use heph_rt::spawn::SyncActorOptions;

let opts = SyncActorOptions::default().with_name("My sync actor".to_owned());

Implementations

Returns the name of the synchronous actor, if any.

Set the name of the actor. This is for example used in the naming of the thread in which the actor runs.

Defaults to “Sync actor $n”, where $n is some number.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a 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

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 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.