Enum slip132::KeyApplication
source · #[non_exhaustive]pub enum KeyApplication {
Hashed,
SegWit,
SegWitMultisig,
Nested,
NestedMultisig,
}
Expand description
SLIP 132-defined key applications defining types of scriptPubkey descriptors in which they can be used
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Hashed
xprv/xpub: keys that can be used for P2PKH and multisig P2SH scriptPubkey descriptors.
SegWit
zprv/zpub: keys that can be used for P2WPKH scriptPubkey descriptors
SegWitMultisig
Zprv/Zpub: keys that can be used for multisig P2WSH scriptPubkey descriptors
Nested
yprv/ypub: keys that can be used for P2WPKH-in-P2SH scriptPubkey descriptors
NestedMultisig
Yprv/Ypub: keys that can be used for multisig P2WSH-in-P2SH scriptPubkey descriptors
Implementations§
source§impl KeyApplication
impl KeyApplication
sourcepub const ALL: [KeyApplication; 5] = _
pub const ALL: [KeyApplication; 5] = _
Enumerates all application variants
sourcepub fn from_derivation_path(path: DerivationPath) -> Option<KeyApplication>
pub fn from_derivation_path(path: DerivationPath) -> Option<KeyApplication>
Deduces application variant corresponding to the provided derivation path, if possible.
sourcepub fn to_derivation_path(&self) -> Option<DerivationPath>
pub fn to_derivation_path(&self) -> Option<DerivationPath>
Constructs derivation path matching the provided application
Trait Implementations§
source§impl Clone for KeyApplication
impl Clone for KeyApplication
source§fn clone(&self) -> KeyApplication
fn clone(&self) -> KeyApplication
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 Debug for KeyApplication
impl Debug for KeyApplication
source§impl Display for KeyApplication
impl Display for KeyApplication
source§impl FromStr for KeyApplication
impl FromStr for KeyApplication
source§impl Ord for KeyApplication
impl Ord for KeyApplication
source§fn cmp(&self, other: &KeyApplication) -> Ordering
fn cmp(&self, other: &KeyApplication) -> 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 PartialEq for KeyApplication
impl PartialEq for KeyApplication
source§fn eq(&self, other: &KeyApplication) -> bool
fn eq(&self, other: &KeyApplication) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for KeyApplication
impl PartialOrd for KeyApplication
source§fn partial_cmp(&self, other: &KeyApplication) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyApplication) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for KeyApplication
impl Eq for KeyApplication
impl StructuralPartialEq for KeyApplication
Auto Trait Implementations§
impl Freeze for KeyApplication
impl RefUnwindSafe for KeyApplication
impl Send for KeyApplication
impl Sync for KeyApplication
impl Unpin for KeyApplication
impl UnwindSafe for KeyApplication
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