Struct heph::spawn::options::ActorOptions[][src]

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

Options for spawning an Actor.

Examples

Using the default options.

use heph::spawn::ActorOptions;

let opts = ActorOptions::default();

Giving an actor a high priority.

use heph::spawn::options::{ActorOptions, Priority};

let opts = ActorOptions::default().with_priority(Priority::HIGH);

Implementations

Returns the priority set in the options.

Set the scheduling priority.

Returns true if the actor is ready to run when spawned.

See mark_ready for more information.

This option will marks the actor as ready to run (or not) when spawned.

By default newly spawned actors will be considered to be ready to run once they are spawned. However some actors might not want to run immediately and wait for an external event before running. Such an external event can for example be a TcpStream becoming ready to read or write.

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

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.