Xtor: An handler async actor framework.
Key features
- small: very small codebase
- async: allow you to write async code in your actor
- full featured: we have built-in types such as
SupervisorBrokerCallerand so on - both dynamic and fast: typed message and weak typed event.
usage
add xtor to your library
cargo add xtor
write some code
use Result;
use async_trait;
use ;
// first define actor
;
// then define message
;
// then impl the handler
// main will finish when all actors died out.
async
project structure
src/actor/*for pure async actor implementationsrc/utils/*for utilities both trait and default implementation such asDefaultBrokerDefaultSupervisorService