pub struct CkbInvoice {
pub currency: Currency,
pub amount: Option<u128>,
pub signature: Option<String>,
pub data: InvoiceData,
}Expand description
Represents a syntactically and semantically correct lightning BOLT11 invoice.
There are three ways to construct a CkbInvoice:
- using [
CkbInvoiceBuilder] - using
str::parse::<CkbInvoice>(&str)(see [CkbInvoice::from_str])
Fields§
§currency: CurrencyThe currency of the invoice
amount: Option<u128>The amount of the invoice
signature: Option<String>The signature of the invoice (hex encoded)
data: InvoiceDataThe invoice data, including the payment hash, timestamp and other attributes
Trait Implementations§
Source§impl Clone for CkbInvoice
impl Clone for CkbInvoice
Source§fn clone(&self) -> CkbInvoice
fn clone(&self) -> CkbInvoice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CkbInvoice
impl Debug for CkbInvoice
Source§impl<'de> Deserialize<'de> for CkbInvoice
impl<'de> Deserialize<'de> for CkbInvoice
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 CkbInvoice
Source§impl JsonSchema for CkbInvoice
impl JsonSchema for CkbInvoice
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CkbInvoice
impl PartialEq for CkbInvoice
Source§impl Serialize for CkbInvoice
impl Serialize for CkbInvoice
impl StructuralPartialEq for CkbInvoice
Auto Trait Implementations§
impl Freeze for CkbInvoice
impl RefUnwindSafe for CkbInvoice
impl Send for CkbInvoice
impl Sync for CkbInvoice
impl Unpin for CkbInvoice
impl UnsafeUnpin for CkbInvoice
impl UnwindSafe for CkbInvoice
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