pub enum InvoiceDescription<'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.
(C-not exported) 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
sourceimpl<'f> Clone for InvoiceDescription<'f>
impl<'f> Clone for InvoiceDescription<'f>
sourcefn clone(&self) -> InvoiceDescription<'f>
fn clone(&self) -> InvoiceDescription<'f>
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<'f> Debug for InvoiceDescription<'f>
impl<'f> Debug for InvoiceDescription<'f>
sourceimpl<'f> PartialEq<InvoiceDescription<'f>> for InvoiceDescription<'f>
impl<'f> PartialEq<InvoiceDescription<'f>> for InvoiceDescription<'f>
sourcefn eq(&self, other: &InvoiceDescription<'f>) -> bool
fn eq(&self, other: &InvoiceDescription<'f>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &InvoiceDescription<'f>) -> bool
fn ne(&self, other: &InvoiceDescription<'f>) -> bool
This method tests for !=
.
impl<'f> Eq for InvoiceDescription<'f>
impl<'f> StructuralEq for InvoiceDescription<'f>
impl<'f> StructuralPartialEq for InvoiceDescription<'f>
Auto Trait Implementations
impl<'f> RefUnwindSafe for InvoiceDescription<'f>
impl<'f> Send for InvoiceDescription<'f>
impl<'f> Sync for InvoiceDescription<'f>
impl<'f> Unpin for InvoiceDescription<'f>
impl<'f> UnwindSafe for InvoiceDescription<'f>
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