pub struct LightningPayment { /* private fields */ }Available on crate feature
lightning only.Expand description
Represents a lightning payment (bolt11 invoice or bolt12 offer)
Implementations§
Source§impl LightningPayment
impl LightningPayment
Sourcepub fn new(s: &str) -> Result<Arc<Self>, LwkError>
pub fn new(s: &str) -> Result<Arc<Self>, LwkError>
Construct a lightning payment (bolt11 invoice or bolt12 offer) from a string
Sourcepub fn from_bolt11_invoice(invoice: Arc<Bolt11Invoice>) -> Arc<Self>
pub fn from_bolt11_invoice(invoice: Arc<Bolt11Invoice>) -> Arc<Self>
Construct a lightning payment (bolt11 invoice or bolt12 offer) from a bolt11 invoice
Sourcepub fn bolt11_invoice(&self) -> Option<Arc<Bolt11Invoice>>
pub fn bolt11_invoice(&self) -> Option<Arc<Bolt11Invoice>>
Returns the bolt11 invoice if the lightning payment is a bolt11 invoice
Trait Implementations§
Source§impl AsRef<LightningPayment> for LightningPayment
impl AsRef<LightningPayment> for LightningPayment
Source§fn as_ref(&self) -> &LightningPayment
fn as_ref(&self) -> &LightningPayment
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Display for LightningPayment
impl Display for LightningPayment
Source§impl From<LightningPayment> for LightningPayment
impl From<LightningPayment> for LightningPayment
Source§fn from(inner: LightningPayment) -> Self
fn from(inner: LightningPayment) -> Self
Converts to this type from the input type.
Source§impl<UT> LiftRef<UT> for LightningPayment
impl<UT> LiftRef<UT> for LightningPayment
type LiftType = Arc<LightningPayment>
Source§impl<UT> LowerError<UT> for LightningPayment
impl<UT> LowerError<UT> for LightningPayment
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 LightningPayment
impl<UT> LowerReturn<UT> for LightningPayment
Source§type ReturnType = <Arc<LightningPayment> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<LightningPayment> 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<UT> TypeId<UT> for LightningPayment
impl<UT> TypeId<UT> for LightningPayment
Auto Trait Implementations§
impl Freeze for LightningPayment
impl RefUnwindSafe for LightningPayment
impl Send for LightningPayment
impl Sync for LightningPayment
impl Unpin for LightningPayment
impl UnwindSafe for LightningPayment
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, 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.