pub struct InvoicePayerUsingTime<P: Deref, R: Router, S: Deref, L: Deref, E: EventHandler, T: Time>where
    P::Target: Payer,
    S::Target: for<'a> LockableScore<'a>,
    L::Target: Logger,
{ /* private fields */ }
Expand description

(C-not exported) generally all users should use the InvoicePayer type alias.

Implementations

Creates an invoice payer that retries failed payment paths.

Will forward any Event::PaymentPathFailed events to the decorated event_handler once retry has been exceeded for a given Invoice.

Pays the given Invoice, caching it for later use in case a retry is needed.

You should ensure that the invoice.payment_hash() is unique and the same payment_hash has never been paid before. Because InvoicePayer is stateless no effort is made to do so for you.

Pays the given zero-value Invoice using the given amount, caching it for later use in case a retry is needed.

You should ensure that the invoice.payment_hash() is unique and the same payment_hash has never been paid before. Because InvoicePayer is stateless no effort is made to do so for you.

Pays pubkey an amount using the hash of the given preimage, caching it for later use in case a retry is needed.

You should ensure that payment_preimage is unique and that its payment_hash has never been paid before. Because InvoicePayer is stateless no effort is made to do so for you.

Removes the payment cached by the given payment hash.

Should be called once a payment has failed or succeeded if not using InvoicePayer as an EventHandler. Otherwise, calling this method is unnecessary.

Trait Implementations

Handles the given Event. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.