Trait FromTree

Source
pub trait FromTree: Sized {
    // Required method
    fn from_tree(top: &Tree<'_>) -> Result<Self, Error>;
}
Expand description

A trait for extracting a structure from a Tree representation in token form

Required Methods§

Source

fn from_tree(top: &Tree<'_>) -> Result<Self, Error>

Extract a structure from Tree representation

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.

Implementations on Foreign Types§

Source§

impl<Pk, Ctx, Ext> FromTree for Arc<Terminal<Pk, Ctx, Ext>>
where Pk: FromStrKey, Ctx: ScriptContext, Ext: Extension,

Source§

fn from_tree(top: &Tree<'_>) -> Result<Arc<Terminal<Pk, Ctx, Ext>>, Error>

Source§

impl<Pk, Ctx, Ext> FromTree for Arc<Miniscript<Pk, Ctx, Ext>>
where Pk: FromStrKey, Ctx: ScriptContext, Ext: Extension,

Source§

fn from_tree(top: &Tree<'_>) -> Result<Arc<Miniscript<Pk, Ctx, Ext>>, Error>

Source§

impl<T: ExtParam> FromTree for Box<Expr<T>>

Source§

fn from_tree(top: &Tree<'_>) -> Result<Self, Error>

Source§

impl<T: ExtParam> FromTree for Box<ArithInner<T>>

Source§

fn from_tree(top: &Tree<'_>) -> Result<Self, Error>

Implementors§

Source§

impl FromTree for IdxExpr

Source§

impl<Pk> FromTree for elements_miniscript::policy::concrete::Policy<Pk>
where Pk: FromStrKey,

Source§

impl<Pk> FromTree for elements_miniscript::policy::semantic::Policy<Pk>
where Pk: FromStrKey,

Source§

impl<Pk> FromTree for Pegin<Pk>
where Pk: FromStrKey,

Source§

impl<Pk> FromTree for LegacyPegin<Pk>
where Pk: FromStrKey,

Source§

impl<Pk> FromTree for Bare<Pk>
where Pk: FromStrKey,

Source§

impl<Pk> FromTree for Pkh<Pk>
where Pk: FromStrKey,

Source§

impl<Pk> FromTree for Sh<Pk>
where Pk: FromStrKey,

Source§

impl<Pk> FromTree for Wpkh<Pk>
where Pk: FromStrKey,

Source§

impl<Pk> FromTree for Wsh<Pk>
where Pk: FromStrKey,

Source§

impl<Pk, Ctx, Ext> FromTree for Terminal<Pk, Ctx, Ext>
where Pk: FromStrKey, Ctx: ScriptContext, Ext: Extension,

Source§

impl<Pk, Ctx, Ext> FromTree for Miniscript<Pk, Ctx, Ext>
where Pk: FromStrKey, Ctx: ScriptContext, Ext: Extension,

Source§

impl<Pk, Ext> FromTree for LegacyCSFSCov<Pk, Ext>
where Pk: FromStrKey, Ext: Extension,

Source§

impl<Pk, Ext> FromTree for Tr<Pk, Ext>
where Pk: FromStrKey, Ext: Extension,

Source§

impl<Pk, T> FromTree for Descriptor<Pk, T>
where Pk: FromStrKey, T: Extension,

Source§

impl<T: ExtParam> FromTree for CovOps<T>

Source§

impl<T: ExtParam> FromTree for Expr<T>