[][src]Trait solana_rbpf::insn_builder::Instruction

pub trait Instruction: Sized {
    fn opt_code_byte(&self) -> u8;
fn get_insn(&self) -> &Insn;
fn get_insn_mut(&mut self) -> &mut Insn; fn get_dst(&self) -> u8 { ... }
fn get_src(&self) -> u8 { ... }
fn get_off(&self) -> i16 { ... }
fn get_imm(&self) -> i32 { ... }
fn set_dst(self, dst: u8) -> Self { ... }
fn set_src(self, src: u8) -> Self { ... }
fn set_off(self, offset: i16) -> Self { ... }
fn set_imm(self, imm: i32) -> Self { ... } }

Represents single eBPF instruction

Required methods

fn opt_code_byte(&self) -> u8

returns instruction opt code

fn get_insn(&self) -> &Insn

get ebpf::Insn struct

fn get_insn_mut(&mut self) -> &mut Insn

get mutable ebpf::Insn struct

Loading content...

Provided methods

fn get_dst(&self) -> u8

returns destination register

fn get_src(&self) -> u8

returns source register

fn get_off(&self) -> i16

returns offset bytes

fn get_imm(&self) -> i32

returns immediate value

fn set_dst(self, dst: u8) -> Self

sets destination register

fn set_src(self, src: u8) -> Self

sets source register

fn set_off(self, offset: i16) -> Self

sets offset bytes

fn set_imm(self, imm: i32) -> Self

sets immediate value

Loading content...

Implementors

impl<'i> Instruction for Exit<'i>[src]

impl<'i> Instruction for FunctionCall<'i>[src]

impl<'i> Instruction for Jump<'i>[src]

impl<'i> Instruction for Load<'i>[src]

impl<'i> Instruction for Move<'i>[src]

impl<'i> Instruction for Store<'i>[src]

impl<'i> Instruction for SwapBytes<'i>[src]

Loading content...