pub enum IdxExpr {
Const(usize),
CurrIdx,
Add(Box<IdxExpr>, Box<IdxExpr>),
Sub(Box<IdxExpr>, Box<IdxExpr>),
Mul(Box<IdxExpr>, Box<IdxExpr>),
Div(Box<IdxExpr>, Box<IdxExpr>),
}
Expand description
Enum representing operations with input/output indexes. Pushes a single CScriptNum on stack top. This is used to represent the index of the input or output.
Variants§
Const(usize)
A constant
<i>
as CScriptNum
CurrIdx
Current Input index
Add(Box<IdxExpr>, Box<IdxExpr>)
Add two IdxExpr
[X] [Y] ADD
Sub(Box<IdxExpr>, Box<IdxExpr>)
Subtract two IdxExpr
[X] [Y] SUB
Mul(Box<IdxExpr>, Box<IdxExpr>)
Multiply two IdxExpr
[X] SCIPTNUMTOLE64 [Y] SCIPTNUMTOLE64 MUL64 <1> EQUALVERIFY LE64TOSCIPTNUM
Div(Box<IdxExpr>, Box<IdxExpr>)
Divide two IdxExpr (integer division)
[X] SCIPTNUMTOLE64 [Y] SCIPTNUMTOLE64 DIV64 <1> EQUALVERIFY NIP LE64TOSCIPTNUM
Implementations§
Trait Implementations§
Source§impl Ord for IdxExpr
impl Ord for IdxExpr
Source§impl PartialOrd for IdxExpr
impl PartialOrd for IdxExpr
impl Eq for IdxExpr
impl StructuralPartialEq for IdxExpr
Auto Trait Implementations§
impl Freeze for IdxExpr
impl RefUnwindSafe for IdxExpr
impl Send for IdxExpr
impl Sync for IdxExpr
impl Unpin for IdxExpr
impl UnwindSafe for IdxExpr
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