chikatetsu
An(other) actor framework for tokio.
Why?
Most other actor frameworks use some form of dyn Any
, which is basically telling the compiler, "screw your type checking, I have Box
es".
Instead of using dynamic dispatch, we generate and enum that contains all possible types of messages an actor will handle. This is done automagically through a derive macro, and is handeled behind-the-scenes, so you technically never have to use the generated enum in your code (see example below).
use *;
;
;
;
;
/*
Generated enums:
pub enum MathActorMessages {
Add(Add),
Subtract(Subtract),
}
pub enum MathActorReplies {
AddResult(AddResult),
SubtractResult(SubtractResult),
}
*/
;
async