Trait Extension

Source
pub trait Extension:
    Clone
    + Eq
    + Ord
    + Debug
    + Display
    + Hash {
    // Required methods
    fn corr_prop(&self) -> Correctness;
    fn mall_prop(&self) -> Malleability;
    fn extra_prop(&self) -> ExtData;
    fn script_size(&self) -> usize;
    fn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>;
    fn from_name_tree(
        _name: &str,
        children: &[Tree<'_>],
    ) -> Result<Self, FromTokenIterError>;

    // Provided method
    fn tap_ctx_checks(&self) -> Result<(), ScriptContextError> { ... }
}
Expand description

Extensions to elements-miniscript. Refer to implementations(unimplemented!) for example and tutorials

Required Methods§

Source

fn corr_prop(&self) -> Correctness

Calculate the correctness property for the leaf fragment. See miniscript reference for more info on different types

Source

fn mall_prop(&self) -> Malleability

Calculate the malleability property for the leaf fragment. See miniscript reference for more info on different types

Source

fn extra_prop(&self) -> ExtData

Calculate the Extra properties property for the leaf fragment. See current implementation for different fragments in extra_props.rs

Source

fn script_size(&self) -> usize

Get the script size of the current fragment

Source

fn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>

Validity rules for fragment in segwit context

Source

fn from_name_tree( _name: &str, children: &[Tree<'_>], ) -> Result<Self, FromTokenIterError>

Create an instance of this object from a Tree with root name and children as Vec<Tree>.

Provided Methods§

Source

fn tap_ctx_checks(&self) -> Result<(), ScriptContextError>

Validity rules for fragment in tap context

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§