Skip to main content

PaymentUriMethod

Trait PaymentUriMethod 

pub trait PaymentUriMethod {
    // Required methods
    fn kind(&self) -> &'static str;
    fn supports_network(&self, network: Network) -> bool;
    fn priority(&self) -> usize;
}
Expand description

A method a PaymentUri resolves to.

Required Methods§

fn kind(&self) -> &'static str

The method’s kind as a stable string, e.g. “invoice”, “lnurl-withdraw”.

fn supports_network(&self, network: Network) -> bool

Whether the method is valid for network.

fn priority(&self) -> usize

Higher priority methods are preferred. For sort_by_key and friends.

Implementors§