pub enum ScriptSource {
Embedded(Expression),
UtxoRef {
ref: Expression,
source: Option<Expression>,
},
}Variants§
Implementations§
Source§impl ScriptSource
impl ScriptSource
pub fn new_ref(ref: Expression, source: Expression) -> Self
pub fn new_embedded(source: Expression) -> Self
pub fn expect_parameter(policy_name: String) -> Self
pub fn expect_ref_input(policy_name: String, ref: Expression) -> Self
pub fn as_utxo_ref(&self) -> Option<Expression>
Trait Implementations§
Source§impl Clone for ScriptSource
impl Clone for ScriptSource
Source§fn clone(&self) -> ScriptSource
fn clone(&self) -> ScriptSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Composite for ScriptSource
impl Composite for ScriptSource
fn reduce_self(self) -> Result<Self, Error>
fn components(&self) -> Vec<&Expression>
fn try_map_components<F>(self, f: F) -> Result<Self, Error>
fn reduce_nested(self) -> Result<Self, Error>
Source§impl Debug for ScriptSource
impl Debug for ScriptSource
Source§impl<'de> Deserialize<'de> for ScriptSource
impl<'de> Deserialize<'de> for ScriptSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ScriptSource
impl PartialEq for ScriptSource
Source§impl Serialize for ScriptSource
impl Serialize for ScriptSource
Source§impl TryFrom<&ArgValue> for ScriptSource
impl TryFrom<&ArgValue> for ScriptSource
impl Eq for ScriptSource
impl StructuralPartialEq for ScriptSource
Auto Trait Implementations§
impl Freeze for ScriptSource
impl RefUnwindSafe for ScriptSource
impl Send for ScriptSource
impl Sync for ScriptSource
impl Unpin for ScriptSource
impl UnsafeUnpin for ScriptSource
impl UnwindSafe for ScriptSource
Blanket Implementations§
Source§impl<T> Apply for T
impl<T> Apply for T
fn apply_args(self, args: &BTreeMap<String, ArgValue>) -> Result<T, Error>
fn apply_inputs(self, args: &BTreeMap<String, UtxoSet>) -> Result<T, Error>
fn apply_fees(self, fees: u64) -> Result<T, Error>
fn is_constant(&self) -> bool
fn params(&self) -> BTreeMap<String, Type>
fn queries(&self) -> BTreeMap<String, InputQuery>
fn reduce(self) -> Result<T, Error>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more