toktor 0.2.1

A small tokio-based Actor framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::test_actor::TestActor;
use tokio::sync::mpsc;

#[tokio::test]
async fn actors_impl_debug() {
    let (tx, _) = mpsc::channel(10);

    let actor = toktor::spawn(10, TestActor::new(tx));
    assert_eq!(
        format!("{:?}", actor),
        "ActorHandle { capacity: 10, cancelled: false }"
    );
}