pub enum DescriptorTree<Pk: MiniscriptKey> {
Keyless(bool),
Key(Pk),
Threshold(Threshold<DescriptorTree<Pk>, 0>),
}Expand description
A tree can be keyless, a key, or a threshold of trees
Variants§
Keyless(bool)
A keyless tree that can be either satisfiable or unsatisfiable
Key(Pk)
A key
Threshold(Threshold<DescriptorTree<Pk>, 0>)
A threshold of trees
Implementations§
Source§impl<Pk: MiniscriptKey> DescriptorTree<Pk>
impl<Pk: MiniscriptKey> DescriptorTree<Pk>
Sourcepub fn extract_keys(&self) -> Vec<Pk>
pub fn extract_keys(&self) -> Vec<Pk>
Returns a list of keys in the descriptor
Sourcepub fn prune_keyless(&self) -> Option<KeylessDescriptorTree<Pk>>
pub fn prune_keyless(&self) -> Option<KeylessDescriptorTree<Pk>>
Prune keyless leaves assuming satisifiable conditions are satisfied. Sets new_k = max(old_k - num(satisfiable keyless leaves), 0) in each threshold.
Trait Implementations§
Source§impl<Pk: Clone + MiniscriptKey> Clone for DescriptorTree<Pk>
impl<Pk: Clone + MiniscriptKey> Clone for DescriptorTree<Pk>
Source§fn clone(&self) -> DescriptorTree<Pk>
fn clone(&self) -> DescriptorTree<Pk>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<Pk> Freeze for DescriptorTree<Pk>where
Pk: Freeze,
impl<Pk> RefUnwindSafe for DescriptorTree<Pk>where
Pk: RefUnwindSafe,
impl<Pk> Send for DescriptorTree<Pk>where
Pk: Send,
impl<Pk> Sync for DescriptorTree<Pk>where
Pk: Sync,
impl<Pk> Unpin for DescriptorTree<Pk>where
Pk: Unpin,
impl<Pk> UnsafeUnpin for DescriptorTree<Pk>where
Pk: UnsafeUnpin,
impl<Pk> UnwindSafe for DescriptorTree<Pk>where
Pk: UnwindSafe,
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