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