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

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[src][]

returns instruction opt code

fn get_insn(&self) -> &Insn[src][]

get ebpf::Insn struct

fn get_insn_mut(&mut self) -> &mut Insn[src][]

get mutable ebpf::Insn struct

Provided methods

fn get_dst(&self) -> u8[src][]

returns destination register

fn get_src(&self) -> u8[src][]

returns source register

fn get_off(&self) -> i16[src][]

returns offset bytes

fn get_imm(&self) -> i32[src][]

returns immediate value

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

sets destination register

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

sets source register

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

sets offset bytes

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

sets immediate value

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][+]