pub async fn spawn_local<T: ThreadLocalActor>(
args: T::Arguments,
spawner: ThreadLocalActorSpawner,
) -> Result<(ActorRef<T::Msg>, JoinHandle<()>), SpawnErr>Expand description
Perform a background-spawn of an thread-local actor. This is a utility wrapper over thread_local::ThreadLocalActor::spawn which assumes the actor implementation implements Default.
args- The arguments to start the actorspawner- The thread-local spawner (thread_local::ThreadLocalActorSpawner) used to spawn thread-local actors
Returns [Ok((ActorRef, JoinHandle<()>))] upon successful actor startup, [Err(SpawnErr)] otherwise