[−][src]Enum miniscript::policy::Policy
Script descriptor
Variants
Key(P)
A public key which must sign to satisfy the descriptor
Multi(usize, Vec<P>)
A set of keys, signatures must be provided for k
of them
Hash(Hash)
A SHA256 whose preimage must be provided to satisfy the descriptor
Time(u32)
A locktime restriction
Threshold(usize, Vec<Policy<P>>)
A set of descriptors, satisfactions must be provided for k
of them
And(Box<Policy<P>>, Box<Policy<P>>)
A list of descriptors, all of which must be satisfied
Or(Box<Policy<P>>, Box<Policy<P>>)
A pair of descriptors, one of which must be satisfied
AsymmetricOr(Box<Policy<P>>, Box<Policy<P>>)
Same as Or
, but the second option is assumed to never be taken for costing purposes
Methods
impl<P: Clone + Debug> Policy<P>
[src]
pub fn abstract_policy(&self) -> AbstractPolicy<P>
[src]
Abstract the policy into an "abstract policy" which can be filtered and analyzed
impl<P> Policy<P>
[src]
pub fn translate<F, Q, E>(&self, translatefn: F) -> Result<Policy<Q>, E> where
F: FnMut(&P) -> Result<Q, E>,
[src]
F: FnMut(&P) -> Result<Q, E>,
Convert a policy using abstract keys to one using specific keys
Trait Implementations
impl<P: FromStr> FromTree for Policy<P> where
P::Err: ToString + Debug,
[src]
P::Err: ToString + Debug,
impl<P: Eq> Eq for Policy<P>
[src]
impl<P: PartialOrd> PartialOrd<Policy<P>> for Policy<P>
[src]
fn partial_cmp(&self, other: &Policy<P>) -> Option<Ordering>
[src]
fn lt(&self, other: &Policy<P>) -> bool
[src]
fn le(&self, other: &Policy<P>) -> bool
[src]
fn gt(&self, other: &Policy<P>) -> bool
[src]
fn ge(&self, other: &Policy<P>) -> bool
[src]
impl<P: PartialEq> PartialEq<Policy<P>> for Policy<P>
[src]
impl<P: Clone> Clone for Policy<P>
[src]
fn clone(&self) -> Policy<P>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<P: Ord> Ord for Policy<P>
[src]
fn cmp(&self, other: &Policy<P>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<P: Display> Display for Policy<P>
[src]
impl<P: Debug> Debug for Policy<P>
[src]
impl<P: FromStr> FromStr for Policy<P> where
P::Err: ToString + Debug,
[src]
P::Err: ToString + Debug,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,