pub struct StateService<HANDLER, SCOPE = HANDLER>where
HANDLER: StateHandler + 'static,
SCOPE: 'static,{ /* private fields */ }Expand description
Context agent for managing shared state. In charge of applying changes to state then notifying subscribers of new state.
Trait Implementations§
Source§impl<HANDLER, SCOPE> Agent for StateService<HANDLER, SCOPE>where
HANDLER: StateHandler + 'static,
SCOPE: 'static,
impl<HANDLER, SCOPE> Agent for StateService<HANDLER, SCOPE>where
HANDLER: StateHandler + 'static,
SCOPE: 'static,
Source§type Message = <HANDLER as StateHandler>::Message
type Message = <HANDLER as StateHandler>::Message
Type of an input message.
Source§type Reach = Context<StateService<HANDLER, SCOPE>>
type Reach = Context<StateService<HANDLER, SCOPE>>
Reach capability of the agent.
Source§type Input = ServiceInput<HANDLER>
type Input = ServiceInput<HANDLER>
Incoming message type.
Source§type Output = ServiceOutput<HANDLER>
type Output = ServiceOutput<HANDLER>
Outgoing message type.
Source§fn handle_input(&mut self, msg: Self::Input, who: HandlerId)
fn handle_input(&mut self, msg: Self::Input, who: HandlerId)
This method called on every incoming message.
Source§fn disconnected(&mut self, who: HandlerId)
fn disconnected(&mut self, who: HandlerId)
This method called on when a new bridge destroyed.
Source§fn name_of_resource() -> &'static str
fn name_of_resource() -> &'static str
Represents the name of loading resorce for remote workers which
have to live in a separate files.
Auto Trait Implementations§
impl<HANDLER, SCOPE> Freeze for StateService<HANDLER, SCOPE>where
HANDLER: Freeze,
impl<HANDLER, SCOPE = HANDLER> !RefUnwindSafe for StateService<HANDLER, SCOPE>
impl<HANDLER, SCOPE = HANDLER> !Send for StateService<HANDLER, SCOPE>
impl<HANDLER, SCOPE = HANDLER> !Sync for StateService<HANDLER, SCOPE>
impl<HANDLER, SCOPE> Unpin for StateService<HANDLER, SCOPE>where
HANDLER: Unpin,
impl<HANDLER, SCOPE = HANDLER> !UnwindSafe for StateService<HANDLER, SCOPE>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more