Skip to main content

RouterMessage

Enum RouterMessage 

Source
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>

§

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>

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.