pub struct Bolt11Invoice { /* private fields */ }Available on crate feature
lightning only.Expand description
Represents a syntactically and semantically correct lightning BOLT11 invoice.
Implementations§
Source§impl Bolt11Invoice
impl Bolt11Invoice
Sourcepub fn amount_milli_satoshis(&self) -> Option<u64>
pub fn amount_milli_satoshis(&self) -> Option<u64>
Returns the amount in millisatoshis if present, None if it’s an “any amount” invoice
Sourcepub fn payment_hash(&self) -> String
pub fn payment_hash(&self) -> String
Returns the payment hash as a hex string
Sourcepub fn invoice_description(&self) -> String
pub fn invoice_description(&self) -> String
Returns the invoice description as a string
Sourcepub fn payee_pub_key(&self) -> Option<String>
pub fn payee_pub_key(&self) -> Option<String>
Returns the payee’s public key if present as a hex string
Sourcepub fn expiry_time(&self) -> u64
pub fn expiry_time(&self) -> u64
Returns the expiry time in seconds (default is 3600 seconds / 1 hour if not specified)
Sourcepub fn min_final_cltv_expiry_delta(&self) -> u64
pub fn min_final_cltv_expiry_delta(&self) -> u64
Returns the minimum CLTV expiry delta
Sourcepub fn payment_secret(&self) -> String
pub fn payment_secret(&self) -> String
Returns the payment secret as a debug string
Trait Implementations§
Source§impl AsRef<Bolt11Invoice> for Bolt11Invoice
impl AsRef<Bolt11Invoice> for Bolt11Invoice
Source§fn as_ref(&self) -> &Bolt11Invoice
fn as_ref(&self) -> &Bolt11Invoice
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for Bolt11Invoice
impl Clone for Bolt11Invoice
Source§fn clone(&self) -> Bolt11Invoice
fn clone(&self) -> Bolt11Invoice
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Bolt11Invoice
impl Debug for Bolt11Invoice
Source§impl Display for Bolt11Invoice
impl Display for Bolt11Invoice
Source§impl From<&Bolt11Invoice> for Bolt11Invoice
impl From<&Bolt11Invoice> for Bolt11Invoice
Source§fn from(invoice: &Bolt11Invoice) -> Self
fn from(invoice: &Bolt11Invoice) -> Self
Converts to this type from the input type.
Source§impl From<Bolt11Invoice> for Bolt11Invoice
impl From<Bolt11Invoice> for Bolt11Invoice
Source§fn from(inner: Bolt11Invoice) -> Self
fn from(inner: Bolt11Invoice) -> Self
Converts to this type from the input type.
Source§impl From<Bolt11Invoice> for Bolt11Invoice
impl From<Bolt11Invoice> for Bolt11Invoice
Source§fn from(invoice: Bolt11Invoice) -> Self
fn from(invoice: Bolt11Invoice) -> Self
Converts to this type from the input type.
Source§impl<UT> LiftRef<UT> for Bolt11Invoice
impl<UT> LiftRef<UT> for Bolt11Invoice
type LiftType = Arc<Bolt11Invoice>
Source§impl<UT> LowerError<UT> for Bolt11Invoice
impl<UT> LowerError<UT> for Bolt11Invoice
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for Bolt11Invoice
impl<UT> LowerReturn<UT> for Bolt11Invoice
Source§type ReturnType = <Arc<Bolt11Invoice> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<Bolt11Invoice> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Source§impl PartialEq for Bolt11Invoice
impl PartialEq for Bolt11Invoice
Source§impl<UT> TypeId<UT> for Bolt11Invoice
impl<UT> TypeId<UT> for Bolt11Invoice
impl Eq for Bolt11Invoice
impl StructuralPartialEq for Bolt11Invoice
Auto Trait Implementations§
impl Freeze for Bolt11Invoice
impl RefUnwindSafe for Bolt11Invoice
impl Send for Bolt11Invoice
impl Sync for Bolt11Invoice
impl Unpin for Bolt11Invoice
impl UnwindSafe for Bolt11Invoice
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.