pub enum RouterMessage<Route: DeliveryRoute + Clone + PartialEq, R: RoutingStrategy<Route>> {
Add(Route),
Remove(Route),
Route(<Route::Protocol as Protocol>::Msg),
Observe(R::Observation),
}Expand description
One command accepted by Router.
Membership changes are processed in mailbox order. Route transfers
ownership of one destination-protocol message to the router. Duplicate
members are inert and removal preserves the relative order of survivors.
Variants§
Add(Route)
Add one eligible recipient if it is not already present.
Remove(Route)
Remove one eligible recipient if present.
Route(<Route::Protocol as Protocol>::Msg)
Select recipient(s) and emit typed deliveries.
Observe(R::Observation)
Deliver one statically selected policy observation.
Auto Trait Implementations§
impl<Route, R> Freeze for RouterMessage<Route, R>where
Route: Freeze,
<<Route as DeliveryRoute>::Protocol as Protocol>::Msg: Freeze,
<R as RoutingStrategy<Route>>::Observation: Freeze,
impl<Route, R> RefUnwindSafe for RouterMessage<Route, R>where
Route: RefUnwindSafe,
<<Route as DeliveryRoute>::Protocol as Protocol>::Msg: RefUnwindSafe,
<R as RoutingStrategy<Route>>::Observation: RefUnwindSafe,
impl<Route, R> Send for RouterMessage<Route, R>where
Route: Send,
<<Route as DeliveryRoute>::Protocol as Protocol>::Msg: Send,
<R as RoutingStrategy<Route>>::Observation: Send,
impl<Route, R> Sync for RouterMessage<Route, R>where
Route: Sync,
<<Route as DeliveryRoute>::Protocol as Protocol>::Msg: Sync,
<R as RoutingStrategy<Route>>::Observation: Sync,
impl<Route, R> Unpin for RouterMessage<Route, R>where
Route: Unpin,
<<Route as DeliveryRoute>::Protocol as Protocol>::Msg: Unpin,
<R as RoutingStrategy<Route>>::Observation: Unpin,
impl<Route, R> UnsafeUnpin for RouterMessage<Route, R>where
Route: UnsafeUnpin,
<<Route as DeliveryRoute>::Protocol as Protocol>::Msg: UnsafeUnpin,
<R as RoutingStrategy<Route>>::Observation: UnsafeUnpin,
impl<Route, R> UnwindSafe for RouterMessage<Route, R>where
Route: UnwindSafe,
<<Route as DeliveryRoute>::Protocol as Protocol>::Msg: UnwindSafe,
<R as RoutingStrategy<Route>>::Observation: UnwindSafe,
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