Struct DefaultRouter
pub struct DefaultRouter<G, L, S, SP, Sc>where
G: Deref<Target = NetworkGraph<L>>,
L: Deref,
S: Deref,
Sc: ScoreLookUp<ScoreParams = SP>,
<L as Deref>::Target: Logger,
<S as Deref>::Target: for<'a> LockableScore<'a, ScoreLookUp = Sc>,{ /* private fields */ }
Expand description
A Router
implemented using find_route
.
Implementations§
§impl<G, L, S, SP, Sc> DefaultRouter<G, L, S, SP, Sc>where
G: Deref<Target = NetworkGraph<L>>,
L: Deref,
S: Deref,
Sc: ScoreLookUp<ScoreParams = SP>,
<L as Deref>::Target: Logger,
<S as Deref>::Target: for<'a> LockableScore<'a, ScoreLookUp = Sc>,
impl<G, L, S, SP, Sc> DefaultRouter<G, L, S, SP, Sc>where
G: Deref<Target = NetworkGraph<L>>,
L: Deref,
S: Deref,
Sc: ScoreLookUp<ScoreParams = SP>,
<L as Deref>::Target: Logger,
<S as Deref>::Target: for<'a> LockableScore<'a, ScoreLookUp = Sc>,
pub fn new(
network_graph: G,
logger: L,
random_seed_bytes: [u8; 32],
scorer: S,
score_params: SP,
) -> DefaultRouter<G, L, S, SP, Sc>
pub fn new( network_graph: G, logger: L, random_seed_bytes: [u8; 32], scorer: S, score_params: SP, ) -> DefaultRouter<G, L, S, SP, Sc>
Creates a new router.
Trait Implementations§
§impl<G, L, S, SP, Sc> Router for DefaultRouter<G, L, S, SP, Sc>where
G: Deref<Target = NetworkGraph<L>>,
L: Deref,
S: Deref,
Sc: ScoreLookUp<ScoreParams = SP>,
<L as Deref>::Target: Logger,
<S as Deref>::Target: for<'a> LockableScore<'a, ScoreLookUp = Sc>,
impl<G, L, S, SP, Sc> Router for DefaultRouter<G, L, S, SP, Sc>where
G: Deref<Target = NetworkGraph<L>>,
L: Deref,
S: Deref,
Sc: ScoreLookUp<ScoreParams = SP>,
<L as Deref>::Target: Logger,
<S as Deref>::Target: for<'a> LockableScore<'a, ScoreLookUp = Sc>,
§fn find_route(
&self,
payer: &PublicKey,
params: &RouteParameters,
first_hops: Option<&[&ChannelDetails]>,
inflight_htlcs: InFlightHtlcs,
) -> Result<Route, LightningError>
fn find_route( &self, payer: &PublicKey, params: &RouteParameters, first_hops: Option<&[&ChannelDetails]>, inflight_htlcs: InFlightHtlcs, ) -> Result<Route, LightningError>
§fn find_route_with_id(
&self,
payer: &PublicKey,
route_params: &RouteParameters,
first_hops: Option<&[&ChannelDetails]>,
inflight_htlcs: InFlightHtlcs,
_payment_hash: PaymentHash,
_payment_id: PaymentId,
) -> Result<Route, LightningError>
fn find_route_with_id( &self, payer: &PublicKey, route_params: &RouteParameters, first_hops: Option<&[&ChannelDetails]>, inflight_htlcs: InFlightHtlcs, _payment_hash: PaymentHash, _payment_id: PaymentId, ) -> Result<Route, LightningError>
Auto Trait Implementations§
impl<G, L, S, SP, Sc> !Freeze for DefaultRouter<G, L, S, SP, Sc>
impl<G, L, S, SP, Sc> RefUnwindSafe for DefaultRouter<G, L, S, SP, Sc>
impl<G, L, S, SP, Sc> Send for DefaultRouter<G, L, S, SP, Sc>
impl<G, L, S, SP, Sc> Sync for DefaultRouter<G, L, S, SP, Sc>
impl<G, L, S, SP, Sc> Unpin for DefaultRouter<G, L, S, SP, Sc>
impl<G, L, S, SP, Sc> UnwindSafe for DefaultRouter<G, L, S, SP, Sc>
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