pub struct DefaultMessageRouter;
Expand description
A MessageRouter
that can only route to a directly connected Destination
.
Trait Implementations§
§impl MessageRouter for DefaultMessageRouter
impl MessageRouter for DefaultMessageRouter
§fn find_path(
&self,
_sender: PublicKey,
peers: Vec<PublicKey>,
destination: Destination,
) -> Result<OnionMessagePath, ()>
fn find_path( &self, _sender: PublicKey, peers: Vec<PublicKey>, destination: Destination, ) -> Result<OnionMessagePath, ()>
Returns a route for sending an
OnionMessage
to the given Destination
.Auto Trait Implementations§
impl Freeze for DefaultMessageRouter
impl RefUnwindSafe for DefaultMessageRouter
impl Send for DefaultMessageRouter
impl Sync for DefaultMessageRouter
impl Unpin for DefaultMessageRouter
impl UnwindSafe for DefaultMessageRouter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request