coactor 0.1.0

An embedded distributed Actor framework for Rust applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use coactor::{actor, Actor, ActorRuntime, MessageContext, test_support::TestServer};

#[actor]
struct CounterActor;

impl Actor<()> for CounterActor {
    fn new(_: ActorRuntime<()>) -> Self { Self }
    async fn on_message(&mut self, _ctx: &MessageContext, _msg: &[u8]) {}
}

fn main() {
    let _builder = TestServer::builder().actor::<CounterActor>("counter");
}