Struct stateroom_server::RoomActor
source · pub struct RoomActor { /* private fields */ }Expand description
Actor model representation of a “room”. A room is a set of clients that share an instance of a Stateroom instance. Conceptually, this is like a room in a chat service. Events (such as messages) and their side-effects are isolated to the room in which they occur.
Implementations§
Trait Implementations§
source§impl Actor for RoomActor
impl Actor for RoomActor
source§fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Called when an actor gets polled the first time.
source§fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Called after an actor is in
Actor::Stopping state. Read moresource§fn start(self) -> Addr<Self>where
Self: Actor<Context = Context<Self>>,
fn start(self) -> Addr<Self>where Self: Actor<Context = Context<Self>>,
Start a new asynchronous actor, returning its address. Read more