Trait Apply

Source
pub trait Apply: Sized + Debug {
    // Required methods
    fn apply_args(
        self,
        args: &BTreeMap<String, ArgValue>,
    ) -> Result<Self, Error>;
    fn apply_inputs(
        self,
        args: &BTreeMap<String, HashSet<Utxo>>,
    ) -> Result<Self, Error>;
    fn apply_fees(self, fees: u64) -> Result<Self, Error>;
    fn is_constant(&self) -> bool;
    fn params(&self) -> BTreeMap<String, Type>;
    fn queries(&self) -> BTreeMap<String, InputQuery>;
    fn reduce(self) -> Result<Self, Error>;
}

Required Methods§

Source

fn apply_args(self, args: &BTreeMap<String, ArgValue>) -> Result<Self, Error>

Source

fn apply_inputs( self, args: &BTreeMap<String, HashSet<Utxo>>, ) -> Result<Self, Error>

Source

fn apply_fees(self, fees: u64) -> Result<Self, Error>

Source

fn is_constant(&self) -> bool

Source

fn params(&self) -> BTreeMap<String, Type>

Source

fn queries(&self) -> BTreeMap<String, InputQuery>

Source

fn reduce(self) -> Result<Self, Error>

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<T> Apply for Option<T>
where T: Apply,

Source§

fn apply_args(self, args: &BTreeMap<String, ArgValue>) -> Result<Self, Error>

Source§

fn apply_inputs( self, args: &BTreeMap<String, HashSet<Utxo>>, ) -> Result<Self, Error>

Source§

fn apply_fees(self, fees: u64) -> Result<Self, Error>

Source§

fn is_constant(&self) -> bool

Source§

fn params(&self) -> BTreeMap<String, Type>

Source§

fn queries(&self) -> BTreeMap<String, InputQuery>

Source§

fn reduce(self) -> Result<Self, Error>

Source§

impl<T> Apply for Vec<T>
where T: Apply,

Source§

fn apply_args(self, args: &BTreeMap<String, ArgValue>) -> Result<Self, Error>

Source§

fn apply_inputs( self, args: &BTreeMap<String, HashSet<Utxo>>, ) -> Result<Self, Error>

Source§

fn apply_fees(self, fees: u64) -> Result<Self, Error>

Source§

fn is_constant(&self) -> bool

Source§

fn params(&self) -> BTreeMap<String, Type>

Source§

fn queries(&self) -> BTreeMap<String, InputQuery>

Source§

fn reduce(self) -> Result<Self, Error>

Source§

impl<T> Apply for HashMap<String, T>
where T: Apply,

Source§

fn apply_args(self, args: &BTreeMap<String, ArgValue>) -> Result<Self, Error>

Source§

fn apply_inputs( self, args: &BTreeMap<String, HashSet<Utxo>>, ) -> Result<Self, Error>

Source§

fn apply_fees(self, fees: u64) -> Result<Self, Error>

Source§

fn is_constant(&self) -> bool

Source§

fn params(&self) -> BTreeMap<String, Type>

Source§

fn queries(&self) -> BTreeMap<String, InputQuery>

Source§

fn reduce(self) -> Result<Self, Error>

Implementors§

Source§

impl Apply for Expression

Source§

impl Apply for Param

Source§

impl Apply for Tx

Source§

impl<T> Apply for T
where T: Composite + Debug,