pub struct RouteAgent<STATE = ()>where
STATE: RouteState,{ /* private fields */ }
Expand description
The RouteAgent holds on to the RouteService singleton and mediates access to it.
It serves as a means to propagate messages to components interested in the state of the current route.
§Warning
All routing-related components/agents/services should use the same type parameter across your application.
If you use multiple agents with different types, then the Agents won’t be able to communicate to each other and associated components may not work as intended.
Trait Implementations§
Source§impl<STATE> Agent for RouteAgent<STATE>where
STATE: RouteState,
impl<STATE> Agent for RouteAgent<STATE>where
STATE: RouteState,
Source§type Input = RouteRequest<STATE>
type Input = RouteRequest<STATE>
Incoming message type.
Source§type Reach = Context<RouteAgent<STATE>>
type Reach = Context<RouteAgent<STATE>>
Reach capability of the agent.
Source§fn create(link: AgentLink<RouteAgent<STATE>>) -> Self
fn create(link: AgentLink<RouteAgent<STATE>>) -> Self
Creates an instance of an agent.
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, id: HandlerId)
fn disconnected(&mut self, id: 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.
Source§fn resource_path_is_relative() -> bool
fn resource_path_is_relative() -> bool
Indicates whether the name of the resource is relative. Read more
Auto Trait Implementations§
impl<STATE> Freeze for RouteAgent<STATE>
impl<STATE = ()> !RefUnwindSafe for RouteAgent<STATE>
impl<STATE = ()> !Send for RouteAgent<STATE>
impl<STATE = ()> !Sync for RouteAgent<STATE>
impl<STATE> Unpin for RouteAgent<STATE>where
STATE: Unpin,
impl<STATE = ()> !UnwindSafe for RouteAgent<STATE>
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
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.