pub trait PaymentGenerator: Display + Send {
// Required methods
fn payment_start(&self) -> Option<Duration>;
fn payment_count(&self) -> Option<u64>;
fn next_payment_wait(&self) -> Result<Duration, PaymentGenerationError>;
fn payment_amount(
&self,
destination_capacity: Option<u64>,
) -> Result<u64, PaymentGenerationError>;
}
Required Methods§
Sourcefn payment_start(&self) -> Option<Duration>
fn payment_start(&self) -> Option<Duration>
Returns the time that the payments should start
Sourcefn payment_count(&self) -> Option<u64>
fn payment_count(&self) -> Option<u64>
Returns the number of payments that should be made
Sourcefn next_payment_wait(&self) -> Result<Duration, PaymentGenerationError>
fn next_payment_wait(&self) -> Result<Duration, PaymentGenerationError>
Returns the number of seconds that a node should wait until firing its next payment.
Sourcefn payment_amount(
&self,
destination_capacity: Option<u64>,
) -> Result<u64, PaymentGenerationError>
fn payment_amount( &self, destination_capacity: Option<u64>, ) -> Result<u64, PaymentGenerationError>
Returns a payment amount based, with a destination capacity optionally provided to inform the amount picked.