Struct Route
pub struct Route {
pub paths: Vec<Path>,
pub route_params: Option<RouteParameters>,
}
Expand description
A route directs a payment from the sender (us) to the recipient. If the recipient supports MPP, it can take multiple paths. Each path is composed of one or more hops through the network.
Fields§
§paths: Vec<Path>
The list of Path
s taken for a single (potentially-)multi-part payment. If no
BlindedTail
s are present, then the pubkey of the last RouteHop
in each path must be
the same.
route_params: Option<RouteParameters>
The route_params
parameter passed to find_route
.
This is used by ChannelManager
to track information which may be required for retries.
Will be None
for objects serialized with LDK versions prior to 0.0.117.
Implementations§
§impl Route
impl Route
pub fn get_total_fees(&self) -> u64
pub fn get_total_fees(&self) -> u64
Returns the total amount of fees paid on this Route
.
For objects serialized with LDK 0.0.117 and after, this includes any extra payment made to
the recipient, which can happen in excess of the amount passed to find_route
via
RouteParameters::final_value_msat
, if we had to reach the htlc_minimum_msat
limits.
pub fn get_total_amount(&self) -> u64
pub fn get_total_amount(&self) -> u64
Returns the total amount paid on this Route
, excluding the fees.
Might be more than requested as part of the given RouteParameters::final_value_msat
if
we had to reach the htlc_minimum_msat
limits.
Trait Implementations§
§impl Writeable for Route
impl Writeable for Route
impl Eq for Route
impl StructuralPartialEq for Route
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnwindSafe for Route
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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>
T
in a tonic::Request