Struct descriptors::TrKey

source ·
pub struct TrKey<K: DeriveXOnly = XpubDerivable>(/* private fields */);

Implementations§

source§

impl<K: DeriveXOnly> TrKey<K>

source

pub fn as_internal_key(&self) -> &K

source

pub fn into_internal_key(self) -> K

Trait Implementations§

source§

impl<K: Clone + DeriveXOnly> Clone for TrKey<K>

source§

fn clone(&self) -> TrKey<K>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<K: Debug + DeriveXOnly> Debug for TrKey<K>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<K: DeriveXOnly> Derive<DerivedScript> for TrKey<K>

source§

fn default_keychain(&self) -> Keychain

source§

fn keychains(&self) -> BTreeSet<Keychain>

source§

fn derive( &self, keychain: impl Into<Keychain>, index: impl Into<NormalIndex> ) -> DerivedScript

source§

fn derive_batch( &self, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, max_count: u8 ) -> Vec<D>

source§

impl<K: DeriveXOnly> Descriptor<K> for TrKey<K>

§

type KeyIter<'k> = Once<&'k K> where Self: 'k, K: 'k

§

type VarIter<'v> = Empty<&'v ()> where Self: 'v, (): 'v

§

type XpubIter<'x> = Once<&'x XpubSpec> where Self: 'x

source§

fn class(&self) -> SpkClass

source§

fn keys(&self) -> Self::KeyIter<'_>

source§

fn vars(&self) -> Self::VarIter<'_>

source§

fn xpubs(&self) -> Self::XpubIter<'_>

source§

fn compr_keyset(&self, _terminal: Terminal) -> IndexMap<CompressedPk, KeyOrigin>

source§

fn xonly_keyset(&self, terminal: Terminal) -> IndexMap<XOnlyPk, TapDerivation>

source§

impl<K: DeriveXOnly> From<K> for TrKey<K>

source§

fn from(v: K) -> Self

Converts to this type from the input type.
source§

impl<S: DeriveSet> From<TrKey<<S as DeriveSet>::XOnly>> for StdDescr<S>

source§

fn from(v: TrKey<S::XOnly>) -> Self

Converts to this type from the input type.
source§

impl<K: Hash + DeriveXOnly> Hash for TrKey<K>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<K: PartialEq + DeriveXOnly> PartialEq for TrKey<K>

source§

fn eq(&self, other: &TrKey<K>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<K: Eq + DeriveXOnly> Eq for TrKey<K>

source§

impl<K: DeriveXOnly> StructuralPartialEq for TrKey<K>

Auto Trait Implementations§

§

impl<K> Freeze for TrKey<K>
where K: Freeze,

§

impl<K> RefUnwindSafe for TrKey<K>
where K: RefUnwindSafe,

§

impl<K> Send for TrKey<K>
where K: Send,

§

impl<K> Sync for TrKey<K>
where K: Sync,

§

impl<K> Unpin for TrKey<K>
where K: Unpin,

§

impl<K> UnwindSafe for TrKey<K>
where K: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DeriveScripts for T

source§

fn derive_address( &self, network: AddressNetwork, keychain: impl Into<Keychain>, index: impl Into<NormalIndex> ) -> Result<Address, AddressError>

source§

fn derive_address_batch( &self, network: AddressNetwork, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, max_count: u8 ) -> Result<Vec<Address>, AddressError>

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> VerifyEq for T
where T: Eq,

source§

fn verify_eq(&self, other: &T) -> bool

Verifies commit-equivalence of two instances of the same type.