pub struct ContentRouter;Expand description
Content-based (topic) router.
Routes messages addressed to a MessageTarget::Topic to all peers
that are subscribed to that topic in the PeerTable.
Implementations§
Source§impl ContentRouter
impl ContentRouter
Trait Implementations§
Source§impl Debug for ContentRouter
impl Debug for ContentRouter
Source§impl Default for ContentRouter
impl Default for ContentRouter
Source§fn default() -> ContentRouter
fn default() -> ContentRouter
Returns the “default value” for a type. Read more
Source§impl Router for ContentRouter
impl Router for ContentRouter
Source§fn route<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
envelope: &'life1 MessageEnvelope,
peers: &'life2 PeerTable,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransportAddress>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn route<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
envelope: &'life1 MessageEnvelope,
peers: &'life2 PeerTable,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransportAddress>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Determine the transport addresses to deliver this message to.
Source§fn strategy(&self) -> RoutingStrategy
fn strategy(&self) -> RoutingStrategy
The routing strategy this router implements.
Auto Trait Implementations§
impl Freeze for ContentRouter
impl RefUnwindSafe for ContentRouter
impl Send for ContentRouter
impl Sync for ContentRouter
impl Unpin for ContentRouter
impl UnsafeUnpin for ContentRouter
impl UnwindSafe for ContentRouter
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