sway_ast::expr::op_code

Trait Inst

Source
pub trait Inst {
    type Args;

    const LIT: &'static str;

    // Required method
    fn instruction(ident: Ident, args: Self::Args) -> Instruction;
}
Expand description

A specific instruction.

Required Associated Constants§

Source

const LIT: &'static str

The instruction’s literal in source code.

Required Associated Types§

Source

type Args

Arguments to the instruction.

Required Methods§

Source

fn instruction(ident: Ident, args: Self::Args) -> Instruction

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.

Implementors§

Source§

impl Inst for AddOpcode

Source§

const LIT: &'static str = "add"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for AddiOpcode

Source§

const LIT: &'static str = "addi"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for AlocOpcode

Source§

const LIT: &'static str = "aloc"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for AndOpcode

Source§

const LIT: &'static str = "and"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for AndiOpcode

Source§

const LIT: &'static str = "andi"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for BalOpcode

Source§

const LIT: &'static str = "bal"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for BheiOpcode

Source§

const LIT: &'static str = "bhei"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for BhshOpcode

Source§

const LIT: &'static str = "bhsh"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for BlddOpcode

Source§

const LIT: &'static str = "bldd"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for BlobOpcode

Source§

const LIT: &'static str = "blob"

Source§

type Args = (AsmImmediate,)

Source§

impl Inst for BsizOpcode

Source§

const LIT: &'static str = "bsiz"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for BurnOpcode

Source§

const LIT: &'static str = "burn"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for CallOpcode

Source§

const LIT: &'static str = "call"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for CbOpcode

Source§

const LIT: &'static str = "cb"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for CcpOpcode

Source§

impl Inst for CfeOpcode

Source§

const LIT: &'static str = "cfe"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for CfeiOpcode

Source§

const LIT: &'static str = "cfei"

Source§

type Args = (AsmImmediate,)

Source§

impl Inst for CfsOpcode

Source§

const LIT: &'static str = "cfs"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for CfsiOpcode

Source§

const LIT: &'static str = "cfsi"

Source§

type Args = (AsmImmediate,)

Source§

impl Inst for CrooOpcode

Source§

const LIT: &'static str = "croo"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for CsizOpcode

Source§

const LIT: &'static str = "csiz"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for DivOpcode

Source§

const LIT: &'static str = "div"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for DiviOpcode

Source§

const LIT: &'static str = "divi"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for Eck1Opcode

Source§

const LIT: &'static str = "eck1"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for Ecr1Opcode

Source§

const LIT: &'static str = "ecr1"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for Ed19Opcode

Source§

const LIT: &'static str = "ed19"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for EqOpcode

Source§

const LIT: &'static str = "eq"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for ExpOpcode

Source§

const LIT: &'static str = "exp"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for ExpiOpcode

Source§

const LIT: &'static str = "expi"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for FlagOpcode

Source§

const LIT: &'static str = "flag"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for GmOpcode

Source§

const LIT: &'static str = "gm"

Source§

type Args = (BaseIdent, AsmImmediate)

Source§

impl Inst for GtOpcode

Source§

const LIT: &'static str = "gt"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for GtfOpcode

Source§

const LIT: &'static str = "gtf"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for JiOpcode

Source§

const LIT: &'static str = "ji"

Source§

type Args = (AsmImmediate,)

Source§

impl Inst for JmpOpcode

Source§

const LIT: &'static str = "jmp"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for JneOpcode

Source§

const LIT: &'static str = "jne"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for JneiOpcode

Source§

const LIT: &'static str = "jnei"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for JnziOpcode

Source§

const LIT: &'static str = "jnzi"

Source§

type Args = (BaseIdent, AsmImmediate)

Source§

impl Inst for K256Opcode

Source§

const LIT: &'static str = "k256"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for LbOpcode

Source§

const LIT: &'static str = "lb"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for LdcOpcode

Source§

impl Inst for LogOpcode

Source§

impl Inst for LogdOpcode

Source§

const LIT: &'static str = "logd"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for LtOpcode

Source§

const LIT: &'static str = "lt"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for LwOpcode

Source§

const LIT: &'static str = "lw"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for MclOpcode

Source§

const LIT: &'static str = "mcl"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for McliOpcode

Source§

const LIT: &'static str = "mcli"

Source§

type Args = (BaseIdent, AsmImmediate)

Source§

impl Inst for McpOpcode

Source§

const LIT: &'static str = "mcp"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for McpiOpcode

Source§

const LIT: &'static str = "mcpi"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for MeqOpcode

Source§

impl Inst for MintOpcode

Source§

const LIT: &'static str = "mint"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for MlogOpcode

Source§

const LIT: &'static str = "mlog"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for ModOpcode

Source§

const LIT: &'static str = "mod"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for ModiOpcode

Source§

const LIT: &'static str = "modi"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for MoveOpcode

Source§

const LIT: &'static str = "move"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for MoviOpcode

Source§

const LIT: &'static str = "movi"

Source§

type Args = (BaseIdent, AsmImmediate)

Source§

impl Inst for MrooOpcode

Source§

const LIT: &'static str = "mroo"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for MulOpcode

Source§

const LIT: &'static str = "mul"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for MuliOpcode

Source§

const LIT: &'static str = "muli"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for NoopOpcode

Source§

const LIT: &'static str = "noop"

Source§

type Args = ()

Source§

impl Inst for NotOpcode

Source§

const LIT: &'static str = "not"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for OrOpcode

Source§

const LIT: &'static str = "or"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for OriOpcode

Source§

const LIT: &'static str = "ori"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for RetOpcode

Source§

const LIT: &'static str = "ret"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for RetdOpcode

Source§

const LIT: &'static str = "retd"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for RvrtOpcode

Source§

const LIT: &'static str = "rvrt"

Source§

type Args = (BaseIdent,)

Source§

impl Inst for S256Opcode

Source§

const LIT: &'static str = "s256"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for SbOpcode

Source§

const LIT: &'static str = "sb"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for ScwqOpcode

Source§

const LIT: &'static str = "scwq"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for SllOpcode

Source§

const LIT: &'static str = "sll"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for SlliOpcode

Source§

const LIT: &'static str = "slli"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for SmoOpcode

Source§

impl Inst for SrlOpcode

Source§

const LIT: &'static str = "srl"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for SrliOpcode

Source§

const LIT: &'static str = "srli"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for SrwOpcode

Source§

const LIT: &'static str = "srw"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for SrwqOpcode

Source§

const LIT: &'static str = "srwq"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for SubOpcode

Source§

const LIT: &'static str = "sub"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for SubiOpcode

Source§

const LIT: &'static str = "subi"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for SwOpcode

Source§

const LIT: &'static str = "sw"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)

Source§

impl Inst for SwwOpcode

Source§

const LIT: &'static str = "sww"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for SwwqOpcode

Source§

const LIT: &'static str = "swwq"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for TimeOpcode

Source§

const LIT: &'static str = "time"

Source§

type Args = (BaseIdent, BaseIdent)

Source§

impl Inst for TrOpcode

Source§

const LIT: &'static str = "tr"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for TroOpcode

Source§

impl Inst for WqamOpcode

Source§

const LIT: &'static str = "wqam"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for WqcmOpcode

Source§

impl Inst for WqdvOpcode

Source§

impl Inst for WqmdOpcode

Source§

const LIT: &'static str = "wqmd"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for WqmlOpcode

Source§

impl Inst for WqmmOpcode

Source§

const LIT: &'static str = "wqmm"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for WqopOpcode

Source§

impl Inst for XorOpcode

Source§

const LIT: &'static str = "xor"

Source§

type Args = (BaseIdent, BaseIdent, BaseIdent)

Source§

impl Inst for XoriOpcode

Source§

const LIT: &'static str = "xori"

Source§

type Args = (BaseIdent, BaseIdent, AsmImmediate)