pub enum Invoice {
Bolt11(Bolt11Invoice),
Bolt12(Bolt12Invoice),
}Expand description
Enum to represent either a lightning Bolt11Invoice or a Bolt12Invoice.
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_msat(&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<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Bolt11Invoice> for Invoice
impl From<Bolt11Invoice> for Invoice
Source§fn from(invoice: Bolt11Invoice) -> Self
fn from(invoice: Bolt11Invoice) -> Self
Converts to this type from the input type.
Source§impl From<Bolt12Invoice> for Invoice
impl From<Bolt12Invoice> for Invoice
Source§fn from(invoice: Bolt12Invoice) -> Self
fn from(invoice: Bolt12Invoice) -> Self
Converts to this type from the input type.
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