// use kameo::{actor::ActorRef, Actor}; use crate::{spawn, spawn_in_thread}; /// Adds a spawn mathod to the actor. pub trait BaseActor: Actor { async fn spawn(self, parent_actor_ref: ActorRef) -> ActorRef { spawn!(parent_actor_ref, self) } async fn spawn_in_thread( self, parent_actor_ref: ActorRef, ) -> ActorRef { spawn_in_thread!(parent_actor_ref, self) } } impl BaseActor for T {}