rust-actor
Installation
SKILL.md
Solution Patterns
Pattern 1: Basic Actor Implementation
use tokio::sync::mpsc::{channel, Sender, Receiver};
use std::collections::HashMap;
// Actor trait
trait Actor: Send + 'static {
type Message: Send + 'static;
type Error: std::error::Error;
fn receive(&mut self, ctx: &mut Context<Self>, msg: Self::Message);
}