pub enum Bolt11InvoiceDescriptionRef<'f> {
Direct(&'f Description),
Hash(&'f Sha256),
}
Expand description
Represents the description of an invoice which has to be either a directly included string or a hash of a description provided out of band.
This is not exported to bindings users as we don’t have a good way to map the reference lifetimes making this practically impossible to use safely in languages like C.
Variants§
Direct(&'f Description)
Reference to the directly supplied description in the invoice
Hash(&'f Sha256)
Reference to the description’s hash included in the invoice
Trait Implementations§
Source§impl<'f> Clone for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Clone for Bolt11InvoiceDescriptionRef<'f>
Source§fn clone(&self) -> Bolt11InvoiceDescriptionRef<'f>
fn clone(&self) -> Bolt11InvoiceDescriptionRef<'f>
Returns a copy 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<'f> Debug for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Debug for Bolt11InvoiceDescriptionRef<'f>
Source§impl<'f> Display for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Display for Bolt11InvoiceDescriptionRef<'f>
Source§impl<'f> Ord for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Ord for Bolt11InvoiceDescriptionRef<'f>
Source§fn cmp(&self, other: &Bolt11InvoiceDescriptionRef<'f>) -> Ordering
fn cmp(&self, other: &Bolt11InvoiceDescriptionRef<'f>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'f> PartialEq for Bolt11InvoiceDescriptionRef<'f>
impl<'f> PartialEq for Bolt11InvoiceDescriptionRef<'f>
Source§fn eq(&self, other: &Bolt11InvoiceDescriptionRef<'f>) -> bool
fn eq(&self, other: &Bolt11InvoiceDescriptionRef<'f>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<'f> PartialOrd for Bolt11InvoiceDescriptionRef<'f>
impl<'f> PartialOrd for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Copy for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Eq for Bolt11InvoiceDescriptionRef<'f>
impl<'f> StructuralPartialEq for Bolt11InvoiceDescriptionRef<'f>
Auto Trait Implementations§
impl<'f> Freeze for Bolt11InvoiceDescriptionRef<'f>
impl<'f> RefUnwindSafe for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Send for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Sync for Bolt11InvoiceDescriptionRef<'f>
impl<'f> Unpin for Bolt11InvoiceDescriptionRef<'f>
impl<'f> UnwindSafe for Bolt11InvoiceDescriptionRef<'f>
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