use crate::actors::actor::Actor;
use crate::actors::actor_context::ActorContext;
use std::any::Any;
pub struct Pong {
pub v: u32,
}
pub struct Boo {
some_data: u32
}
impl Boo {
pub fn new() -> Boo {
Boo {
some_data: 0
}
}
}
impl Actor for Boo {
fn pre_start(self: &mut Self, ctx: ActorContext) {
}
fn post_stop(self: &mut Self, ctx: ActorContext) {
println!("boo postStop");
}
fn receive(self: &mut Self, msg: &Box<Any + Send>, ctx: ActorContext) -> bool {
self.some_data = 100;
true
}
}