Enum bdk::descriptor::policy::Satisfaction
source · [−]pub enum Satisfaction {
Partial {
n: usize,
m: usize,
items: Vec<usize>,
sorted: Option<bool>,
conditions: ConditionMap,
},
PartialComplete {
n: usize,
m: usize,
items: Vec<usize>,
sorted: Option<bool>,
conditions: FoldedConditionMap,
},
Complete {
condition: Condition,
},
None,
}
Expand description
Represent if and how much a policy item is satisfied by the wallet’s descriptor
Variants
Partial
Fields
n: usize
Total number of items
m: usize
Threshold
conditions: ConditionMap
Extra conditions that also need to be satisfied
Only a partial satisfaction of some kind of threshold policy
PartialComplete
Fields
n: usize
Total number of items
m: usize
Threshold
conditions: FoldedConditionMap
Extra conditions that also need to be satisfied
Can reach the threshold of some kind of threshold policy
Complete
Fields
condition: Condition
Extra conditions that also need to be satisfied
Can satisfy the policy item
None
Cannot satisfy or contribute to the policy item
Implementations
sourceimpl Satisfaction
impl Satisfaction
sourcepub fn is_leaf(&self) -> bool
pub fn is_leaf(&self) -> bool
Returns whether the Satisfaction
is a leaf item
Trait Implementations
sourceimpl Clone for Satisfaction
impl Clone for Satisfaction
sourcefn clone(&self) -> Satisfaction
fn clone(&self) -> Satisfaction
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 Satisfaction
impl Debug for Satisfaction
sourceimpl From<bool> for Satisfaction
impl From<bool> for Satisfaction
sourceimpl PartialEq<Satisfaction> for Satisfaction
impl PartialEq<Satisfaction> for Satisfaction
sourcefn eq(&self, other: &Satisfaction) -> bool
fn eq(&self, other: &Satisfaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for Satisfaction
impl Serialize for Satisfaction
impl Eq for Satisfaction
impl StructuralEq for Satisfaction
impl StructuralPartialEq for Satisfaction
Auto Trait Implementations
impl RefUnwindSafe for Satisfaction
impl Send for Satisfaction
impl Sync for Satisfaction
impl Unpin for Satisfaction
impl UnwindSafe for Satisfaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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