Struct yew_router::agent::RouteAgent [−][src]
pub struct RouteAgent<STATE = ()> where
STATE: RouteState, { /* fields omitted */ }
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
impl<STATE> Agent for RouteAgent<STATE> where
STATE: RouteState,
[src]
impl<STATE> Agent for RouteAgent<STATE> where
STATE: RouteState,
[src]type Input = RouteRequest<STATE>
type Input = RouteRequest<STATE>
Incoming message type.
fn create(link: AgentLink<RouteAgent<STATE>>) -> Self
[src]
fn create(link: AgentLink<RouteAgent<STATE>>) -> Self
[src]Creates an instance of an agent.
fn handle_input(&mut self, msg: Self::Input, who: HandlerId)
[src]
fn handle_input(&mut self, msg: Self::Input, who: HandlerId)
[src]This method called on every incoming message.
fn disconnected(&mut self, id: HandlerId)
[src]
fn disconnected(&mut self, id: HandlerId)
[src]This method called on when a new bridge destroyed.
fn name_of_resource() -> &'static str
[src]
fn name_of_resource() -> &'static str
[src]Represents the name of loading resorce for remote workers which have to live in a separate files. Read more
Auto Trait Implementations
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,
STATE: Unpin,
impl<STATE = ()> !UnwindSafe for RouteAgent<STATE>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T, V> IntoOptPropValue<V> for T where
T: IntoPropValue<Option<V>>,
[src]
impl<T, V> IntoOptPropValue<V> for T where
T: IntoPropValue<Option<V>>,
[src]pub fn into_opt_prop_value(self) -> Option<V>
[src]
pub fn into_opt_prop_value(self) -> Option<V>
[src]Convert self
to an optional value of a Properties
struct.
impl<T> IntoPropValue<Option<T>> for T
[src]
impl<T> IntoPropValue<Option<T>> for T
[src]pub fn into_prop_value(self) -> Option<T>
[src]
pub fn into_prop_value(self) -> Option<T>
[src]Convert self
to a value of a Properties
struct.
impl<T> IntoPropValue<T> for T
[src]
impl<T> IntoPropValue<T> for T
[src]pub fn into_prop_value(self) -> T
[src]
pub fn into_prop_value(self) -> T
[src]Convert self
to a value of a Properties
struct.
impl<T> Any for T where
T: Any,
T: Any,