pub enum Invoice {
Bolt11(Bolt11Invoice),
Bolt12(Bolt12Invoice),
}Expand description
Enum to represent either a bolt11 or bolt12 invoice
Used in [LightningPaymentDetails] to represent the invoice to pay.
Variants§
Bolt11(Bolt11Invoice)
Bolt12(Bolt12Invoice)
Implementations§
Source§impl Invoice
impl Invoice
pub fn into_bolt11(self) -> Option<Bolt11Invoice>
pub fn payment_hash(&self) -> PaymentHash
pub fn network(&self) -> Network
pub fn amount_milli_satoshis(&self) -> Option<u64>
pub fn check_signature(&self) -> Result<(), CheckSignatureError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Invoice
impl<'de> Deserialize<'de> for Invoice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Invoice
impl StructuralPartialEq for Invoice
Auto Trait Implementations§
impl Freeze for Invoice
impl RefUnwindSafe for Invoice
impl Send for Invoice
impl Sync for Invoice
impl Unpin for Invoice
impl UnwindSafe for Invoice
Blanket Implementations§
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
Mutably borrows from an owned value. Read more