Enum miniscript::descriptor::DescriptorPublicKey
source · [−]pub enum DescriptorPublicKey {
SinglePub(DescriptorSinglePub),
XPub(DescriptorXPub),
}
Variants
SinglePub(DescriptorSinglePub)
XPub(DescriptorXPub)
Implementations
sourceimpl DescriptorPublicKey
impl DescriptorPublicKey
sourcepub fn derive(self, child_number: ChildNumber) -> DescriptorPublicKey
pub fn derive(self, child_number: ChildNumber) -> DescriptorPublicKey
Derives the specified child key if self is a wildcard xpub. Otherwise returns self.
Panics if given a hardened child number
Trait Implementations
sourceimpl Clone for DescriptorPublicKey
impl Clone for DescriptorPublicKey
sourcefn clone(&self) -> DescriptorPublicKey
fn clone(&self) -> DescriptorPublicKey
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 Debug for DescriptorPublicKey
impl Debug for DescriptorPublicKey
sourceimpl Display for DescriptorPublicKey
impl Display for DescriptorPublicKey
sourceimpl FromStr for DescriptorPublicKey
impl FromStr for DescriptorPublicKey
sourceimpl Hash for DescriptorPublicKey
impl Hash for DescriptorPublicKey
sourceimpl MiniscriptKey for DescriptorPublicKey
impl MiniscriptKey for DescriptorPublicKey
type Hash = DescriptorPublicKey
type Hash = DescriptorPublicKey
The associated Hash type with the publicKey
sourcefn to_pubkeyhash(&self) -> Self
fn to_pubkeyhash(&self) -> Self
Converts an object to PublicHash
sourcefn is_uncompressed(&self) -> bool
fn is_uncompressed(&self) -> bool
Check if the publicKey is uncompressed. The default implementation returns false Read more
sourceimpl Ord for DescriptorPublicKey
impl Ord for DescriptorPublicKey
sourceimpl PartialEq<DescriptorPublicKey> for DescriptorPublicKey
impl PartialEq<DescriptorPublicKey> for DescriptorPublicKey
sourcefn eq(&self, other: &DescriptorPublicKey) -> bool
fn eq(&self, other: &DescriptorPublicKey) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DescriptorPublicKey) -> bool
fn ne(&self, other: &DescriptorPublicKey) -> bool
This method tests for !=
.
sourceimpl PartialOrd<DescriptorPublicKey> for DescriptorPublicKey
impl PartialOrd<DescriptorPublicKey> for DescriptorPublicKey
sourcefn partial_cmp(&self, other: &DescriptorPublicKey) -> Option<Ordering>
fn partial_cmp(&self, other: &DescriptorPublicKey) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl ToPublicKey for DescriptorPublicKey
impl ToPublicKey for DescriptorPublicKey
sourcefn to_public_key(&self) -> PublicKey
fn to_public_key(&self) -> PublicKey
Converts an object to a public key
sourcefn hash_to_hash160(hash: &Self::Hash) -> Hash
fn hash_to_hash160(hash: &Self::Hash) -> Hash
Converts a hashed version of the public key to a hash160
hash. Read more
sourcefn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the size of a public key when serialized in a script, including the length bytes Read more
impl Eq for DescriptorPublicKey
impl StructuralEq for DescriptorPublicKey
impl StructuralPartialEq for DescriptorPublicKey
Auto Trait Implementations
impl RefUnwindSafe for DescriptorPublicKey
impl Send for DescriptorPublicKey
impl Sync for DescriptorPublicKey
impl Unpin for DescriptorPublicKey
impl UnwindSafe for DescriptorPublicKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more