Actify
Note that this crate is under construction. Although used in production, work is done on making an intuitive API, documententation and remaining features. For the time being, this does not follow semantic versioning!
Actify is an actor model built on Tokio that allows annotating any regular implementation block of your own type with the actify! macro.
Benefits
By generating the boilerplate code for you, a few key benefits are provided:
- Async actor model build on Tokio and channels, which can keep arbitrary owned data types.
- Atomic access and mutation of underlying data through clonable handles.
- Typed arguments and return values on the methods from your actor, exposed through each handle.
- No need to manually define message structs or enums!
- Generic methods like get() and set() even without using the macro.
Example
Consider the following example, in which you want to turn your custom Greeter into an actor:
use ;
async