Enum lightning_invoice::Fallback
source · [−]pub enum Fallback {
SegWitProgram {
version: u5,
program: Vec<u8>,
},
PubKeyHash([u8; 20]),
ScriptHash([u8; 20]),
}
Expand description
Fallback address in case no LN payment is possible
Variants
SegWitProgram
PubKeyHash([u8; 20])
ScriptHash([u8; 20])
Trait Implementations
sourceimpl Base32Len for Fallback
impl Base32Len for Fallback
sourcefn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
sourceimpl FromBase32 for Fallback
impl FromBase32 for Fallback
type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing (e.g. because of bad padding).
sourcefn from_base32(field_data: &[u5]) -> Result<Fallback, ParseError>
fn from_base32(field_data: &[u5]) -> Result<Fallback, ParseError>
Convert a base32 slice to Self
.
sourceimpl ToBase32 for Fallback
impl ToBase32 for Fallback
sourcefn write_base32<W: WriteBase32>(
&self,
writer: &mut W
) -> Result<(), <W as WriteBase32>::Err>
fn write_base32<W: WriteBase32>(
&self,
writer: &mut W
) -> Result<(), <W as WriteBase32>::Err>
Encode as base32 and write it to the supplied writer Implementations shouldn’t allocate. Read more
impl Eq for Fallback
impl StructuralEq for Fallback
impl StructuralPartialEq for Fallback
Auto Trait Implementations
impl RefUnwindSafe for Fallback
impl Send for Fallback
impl Sync for Fallback
impl Unpin for Fallback
impl UnwindSafe for Fallback
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)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more