Struct sapio_miniscript::miniscript::types::Type [−][src]
Structure representing the type of a Miniscript fragment, including all properties relevant to the main codebase
Fields
corr: Correctness
Correctness/soundness properties
mall: Malleability
Malleability properties
Implementations
impl Type
[src]
pub fn is_subtype(&self, other: Self) -> bool
[src]
Check whether the self
is a subtype of other
argument .
This checks whether the argument other
has attributes which are present
in the given Type
. This returns true
on same arguments
a.is_subtype(a)
is true
.
Trait Implementations
impl Clone for Type
[src]
impl Copy for Type
[src]
impl Debug for Type
[src]
impl Eq for Type
[src]
impl Hash for Type
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Type
[src]
fn cmp(&self, other: &Type) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Type> for Type
[src]
impl PartialOrd<Type> for Type
[src]
fn partial_cmp(&self, other: &Type) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Property for Type
[src]
fn sanity_checks(&self)
[src]
fn from_true() -> Self
[src]
fn from_false() -> Self
[src]
fn from_pk_k() -> Self
[src]
fn from_pk_h() -> Self
[src]
fn from_multi(k: usize, n: usize) -> Self
[src]
fn from_hash() -> Self
[src]
fn from_sha256() -> Self
[src]
fn from_txtemplate() -> Self
[src]
fn from_hash256() -> Self
[src]
fn from_ripemd160() -> Self
[src]
fn from_hash160() -> Self
[src]
fn from_time(t: u32) -> Self
[src]
fn from_after(t: u32) -> Self
[src]
fn from_older(t: u32) -> Self
[src]
fn cast_alt(self) -> Result<Self, ErrorKind>
[src]
fn cast_swap(self) -> Result<Self, ErrorKind>
[src]
fn cast_check(self) -> Result<Self, ErrorKind>
[src]
fn cast_dupif(self) -> Result<Self, ErrorKind>
[src]
fn cast_verify(self) -> Result<Self, ErrorKind>
[src]
fn cast_nonzero(self) -> Result<Self, ErrorKind>
[src]
fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
[src]
fn cast_true(self) -> Result<Self, ErrorKind>
[src]
fn cast_or_i_false(self) -> Result<Self, ErrorKind>
[src]
fn cast_unlikely(self) -> Result<Self, ErrorKind>
[src]
fn cast_likely(self) -> Result<Self, ErrorKind>
[src]
fn and_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn and_v(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_b(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_d(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_c(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn or_i(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
[src]
fn threshold<S>(k: usize, n: usize, sub_ck: S) -> Result<Self, ErrorKind> where
S: FnMut(usize) -> Result<Self, ErrorKind>,
[src]
S: FnMut(usize) -> Result<Self, ErrorKind>,
fn type_check<Pk, Ctx, C>(
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
Ctx: ScriptContext,
[src]
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Pk: MiniscriptKey,
Ctx: ScriptContext,
Compute the type of a fragment assuming all the children of Miniscript have been computed already.
fn and_n(left: Self, right: Self) -> Result<Self, ErrorKind>
[src]
impl StructuralEq for Type
[src]
impl StructuralPartialEq for Type
[src]
Auto Trait Implementations
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> 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.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,