Create users actor

This commit is contained in:
2022-03-30 11:40:03 +02:00
parent 70aaa1ff44
commit bfe4674f88
6 changed files with 93 additions and 3 deletions

1
src/actors/mod.rs Normal file
View File

@ -0,0 +1 @@
pub mod users_actor;

18
src/actors/users_actor.rs Normal file
View File

@ -0,0 +1,18 @@
use actix::{Actor, Context};
use crate::data::entity_manager::EntityManager;
use crate::data::user::User;
pub struct UsersActor {
manager: EntityManager<User>,
}
impl UsersActor {
pub fn new(manager: EntityManager<User>) -> Self {
Self { manager }
}
}
impl Actor for UsersActor {
type Context = Context<Self>;
}