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: PartialOrd + ExtParam> PartialOrd for AssetExpr<T>
impl<T: PartialOrd + ExtParam> PartialOrd for AssetExpr<T>
impl<T: Eq + ExtParam> Eq for AssetExpr<T>
impl<T: ExtParam> StructuralPartialEq for AssetExpr<T>
Auto Trait Implementations§
impl<T> Freeze for AssetExpr<T>where
T: Freeze,
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