pub struct SpawnBuilder<'a, A: Actor, F: FnOnce() -> A> { /* private fields */ }
Expand description

A builder for specifying how to spawn an Actor. You can specify your own Addr for the Actor, the capacity of the Actor’s inbox, and you can specify whether to spawn the Actor into its own thread or block on the current calling thread.

Implementations

Specify a capacity for the actor’s receiving channel. Accepts Capacity or usize.

Ignored when .with_addr() is used at the same time.

Specify an existing Addr to use with this Actor.

Run this Actor on the current calling thread. This is a blocking call. This function will exit when the Actor has stopped.

Spawn this Actor into a new thread managed by the System.

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.