Random stuff, testing things, and so on.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
307 B

//! The definition of an actor.
use tokio::sync::mpsc;
use tokio::task;
#[async_trait::async_trait]
pub trait Actor {
/// The type of value that the actor will receive.
type Input: Send;
/// Actor execution.
async fn process(&self) -> (task::JoinHandle<()>, mpsc::Sender<Self::Input>);
}