Enum elements_miniscript::extensions::AssetExpr  
source · pub enum AssetExpr<T: ExtParam> {
    Const(T),
    CurrInputAsset,
    Input(IdxExpr),
    Output(IdxExpr),
}Expand description
Enum representing operations with transaction assets. Every variant of this enum pushes a 32 byte asset + 1 byte prefix on stack top.. These operations also support confidential assets. This will abort when - Supplied index is out of bounds.
Variants§
Const(T)
A constant asset id
Minimal push of this <asset_id>
CurrInputAsset
Asset under the current executing input
INSPECTCURRENTINPUTINDEX INPSECTINPUTASSET
Input(IdxExpr)
Explicit asset at the given input index
i INPSECTINPUTASSET
Output(IdxExpr)
Explicit asset at the given output index
i INPSECTOUTPUTASSET
Implementations§
source§impl AssetExpr<CovExtArgs>
 
impl AssetExpr<CovExtArgs>
sourcepub fn push_to_builder(&self, builder: Builder) -> Builder
 
pub fn push_to_builder(&self, builder: Builder) -> Builder
Push this script to builder Panics when trying to push a Null asset. This never occur in honest use-cases as there is no such thing as Null asset
Trait Implementations§
source§impl<T: ExtParam> ArgFromStr for AssetExpr<T>
 
impl<T: ExtParam> ArgFromStr for AssetExpr<T>
source§impl<T: Ord + ExtParam> Ord for AssetExpr<T>
 
impl<T: Ord + ExtParam> Ord for AssetExpr<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq + ExtParam> PartialEq<AssetExpr<T>> for AssetExpr<T>
 
impl<T: PartialEq + ExtParam> PartialEq<AssetExpr<T>> for AssetExpr<T>
source§impl<T: PartialOrd + ExtParam> PartialOrd<AssetExpr<T>> for AssetExpr<T>
 
impl<T: PartialOrd + ExtParam> PartialOrd<AssetExpr<T>> for AssetExpr<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moreimpl<T: Eq + ExtParam> Eq for AssetExpr<T>
impl<T: ExtParam> StructuralEq for AssetExpr<T>
impl<T: ExtParam> StructuralPartialEq for AssetExpr<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for AssetExpr<T>where T: RefUnwindSafe,
impl<T> Send for AssetExpr<T>where T: Send,
impl<T> Sync for AssetExpr<T>where T: Sync,
impl<T> Unpin for AssetExpr<T>where T: Unpin,
impl<T> UnwindSafe for AssetExpr<T>where T: UnwindSafe,
Blanket Implementations§
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