Struct lightning_invoice::utils::DefaultRouter
source · [−]pub struct DefaultRouter<G: Deref<Target = NetworkGraph<L>>, L: Deref, S: Deref>where
L::Target: Logger,
S::Target: for<'a> LockableScore<'a>,{ /* private fields */ }
Expand description
A Router
implemented using find_route
.
Implementations
sourceimpl<G: Deref<Target = NetworkGraph<L>>, L: Deref, S: Deref> DefaultRouter<G, L, S>where
L::Target: Logger,
S::Target: for<'a> LockableScore<'a>,
impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, S: Deref> DefaultRouter<G, L, S>where
L::Target: Logger,
S::Target: for<'a> LockableScore<'a>,
Trait Implementations
sourceimpl<G: Deref<Target = NetworkGraph<L>>, L: Deref, S: Deref> Router for DefaultRouter<G, L, S>where
L::Target: Logger,
S::Target: for<'a> LockableScore<'a>,
impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, S: Deref> Router for DefaultRouter<G, L, S>where
L::Target: Logger,
S::Target: for<'a> LockableScore<'a>,
sourcefn find_route(
&self,
payer: &PublicKey,
params: &RouteParameters,
_payment_hash: &PaymentHash,
first_hops: Option<&[&ChannelDetails]>,
inflight_htlcs: InFlightHtlcs
) -> Result<Route, LightningError>
fn find_route(
&self,
payer: &PublicKey,
params: &RouteParameters,
_payment_hash: &PaymentHash,
first_hops: Option<&[&ChannelDetails]>,
inflight_htlcs: InFlightHtlcs
) -> Result<Route, LightningError>
sourcefn notify_payment_path_failed(&self, path: &[&RouteHop], short_channel_id: u64)
fn notify_payment_path_failed(&self, path: &[&RouteHop], short_channel_id: u64)
Lets the router know that payment through a specific path has failed.
sourcefn notify_payment_path_successful(&self, path: &[&RouteHop])
fn notify_payment_path_successful(&self, path: &[&RouteHop])
Lets the router know that payment through a specific path was successful.
sourcefn notify_payment_probe_successful(&self, path: &[&RouteHop])
fn notify_payment_probe_successful(&self, path: &[&RouteHop])
Lets the router know that a payment probe was successful.
sourcefn notify_payment_probe_failed(&self, path: &[&RouteHop], short_channel_id: u64)
fn notify_payment_probe_failed(&self, path: &[&RouteHop], short_channel_id: u64)
Lets the router know that a payment probe failed.
Auto Trait Implementations
impl<G, L, S> RefUnwindSafe for DefaultRouter<G, L, S>where
G: RefUnwindSafe,
L: RefUnwindSafe,
S: RefUnwindSafe,
impl<G, L, S> Send for DefaultRouter<G, L, S>where
G: Send,
L: Send,
S: Send,
impl<G, L, S> Sync for DefaultRouter<G, L, S>where
G: Sync,
L: Sync,
S: Sync,
impl<G, L, S> Unpin for DefaultRouter<G, L, S>where
G: Unpin,
L: Unpin,
S: Unpin,
impl<G, L, S> UnwindSafe for DefaultRouter<G, L, S>where
G: UnwindSafe,
L: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more