pub struct DirectRouter;Expand description
Point-to-point router.
Looks up the recipient UUID in the peer table and returns its transport addresses. Fails if the recipient is unknown.
Implementations§
Source§impl DirectRouter
impl DirectRouter
Trait Implementations§
Source§impl Debug for DirectRouter
impl Debug for DirectRouter
Source§impl Default for DirectRouter
impl Default for DirectRouter
Source§fn default() -> DirectRouter
fn default() -> DirectRouter
Returns the “default value” for a type. Read more
Source§impl Router for DirectRouter
impl Router for DirectRouter
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 DirectRouter
impl RefUnwindSafe for DirectRouter
impl Send for DirectRouter
impl Sync for DirectRouter
impl Unpin for DirectRouter
impl UnsafeUnpin for DirectRouter
impl UnwindSafe for DirectRouter
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