Struct lightning_invoice::RawInvoice
source · [−]pub struct RawInvoice {
pub hrp: RawHrp,
pub data: RawDataPart,
}
Expand description
Represents an syntactically correct Invoice for a payment on the lightning network, but without the signature information. De- and encoding should not lead to information loss but may lead to different hashes.
For methods without docs see the corresponding methods in Invoice
.
Fields
hrp: RawHrp
human readable part
data: RawDataPart
data part
Implementations
sourceimpl RawInvoice
impl RawInvoice
sourcepub fn sign<F, E>(self, sign_method: F) -> Result<SignedRawInvoice, E> where
F: FnOnce(&Message) -> Result<RecoverableSignature, E>,
pub fn sign<F, E>(self, sign_method: F) -> Result<SignedRawInvoice, E> where
F: FnOnce(&Message) -> Result<RecoverableSignature, E>,
Signs the invoice using the supplied sign_function
. This function MAY fail with an error
of type E
. Since the signature of a SignedRawInvoice
is not required to be valid there
are no constraints regarding the validity of the produced signature.
(C-not exported) As we don’t currently support passing function pointers into methods explicitly.
sourcepub fn known_tagged_fields(
&self
) -> FilterMap<Iter<'_, RawTaggedField>, fn(_: &RawTaggedField) -> Option<&TaggedField>>
pub fn known_tagged_fields(
&self
) -> FilterMap<Iter<'_, RawTaggedField>, fn(_: &RawTaggedField) -> Option<&TaggedField>>
Returns an iterator over all tagged fields with known semantics.
(C-not exported) As there is not yet a manual mapping for a FilterMap
pub fn payment_hash(&self) -> Option<&Sha256>
pub fn description(&self) -> Option<&Description>
pub fn payee_pub_key(&self) -> Option<&PayeePubKey>
pub fn description_hash(&self) -> Option<&Sha256>
pub fn expiry_time(&self) -> Option<&ExpiryTime>
pub fn min_final_cltv_expiry(&self) -> Option<&MinFinalCltvExpiry>
pub fn payment_secret(&self) -> Option<&PaymentSecret>
pub fn features(&self) -> Option<&InvoiceFeatures>
sourcepub fn fallbacks(&self) -> Vec<&Fallback>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn fallbacks(&self) -> Vec<&Fallback>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
(C-not exported) as we don’t support Vec<&NonOpaqueType>
pub fn private_routes(&self) -> Vec<&PrivateRoute>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn amount_pico_btc(&self) -> Option<u64>
pub fn currency(&self) -> Currency
Trait Implementations
sourceimpl Clone for RawInvoice
impl Clone for RawInvoice
sourcefn clone(&self) -> RawInvoice
fn clone(&self) -> RawInvoice
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RawInvoice
impl Debug for RawInvoice
sourceimpl PartialEq<RawInvoice> for RawInvoice
impl PartialEq<RawInvoice> for RawInvoice
sourcefn eq(&self, other: &RawInvoice) -> bool
fn eq(&self, other: &RawInvoice) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RawInvoice) -> bool
fn ne(&self, other: &RawInvoice) -> bool
This method tests for !=
.
impl Eq for RawInvoice
impl StructuralEq for RawInvoice
impl StructuralPartialEq for RawInvoice
Auto Trait Implementations
impl RefUnwindSafe for RawInvoice
impl Send for RawInvoice
impl Sync for RawInvoice
impl Unpin for RawInvoice
impl UnwindSafe for RawInvoice
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more