[−][src]Struct solana_rbpf::insn_builder::BpfCode
BPF instruction stack in byte representation
Methods
impl BpfCode
[src]
impl BpfCode
pub fn new() -> Self | [src] |
creates new empty BPF instruction stack
pub fn add(&mut self, source: Source, arch: Arch) -> Move | [src] |
create ADD instruction
pub fn sub(&mut self, source: Source, arch: Arch) -> Move | [src] |
create SUB instruction
pub fn mul(&mut self, source: Source, arch: Arch) -> Move | [src] |
create MUL instruction
pub fn div(&mut self, source: Source, arch: Arch) -> Move | [src] |
create DIV instruction
pub fn bit_or(&mut self, source: Source, arch: Arch) -> Move | [src] |
create OR instruction
pub fn bit_and(&mut self, source: Source, arch: Arch) -> Move | [src] |
create AND instruction
pub fn left_shift(&mut self, source: Source, arch: Arch) -> Move | [src] |
create LSHIFT instruction
pub fn right_shift(&mut self, source: Source, arch: Arch) -> Move | [src] |
create RSHIFT instruction
pub fn negate(&mut self, arch: Arch) -> Move | [src] |
create NEGATE instruction
pub fn modulo(&mut self, source: Source, arch: Arch) -> Move | [src] |
create MOD instruction
pub fn bit_xor(&mut self, source: Source, arch: Arch) -> Move | [src] |
create XOR instruction
pub fn mov(&mut self, source: Source, arch: Arch) -> Move | [src] |
create MOV instruction
pub fn signed_right_shift(&mut self, source: Source, arch: Arch) -> Move | [src] |
create SIGNED RSHIFT instruction
pub fn swap_bytes(&mut self, endian: Endian) -> SwapBytes | [src] |
create byte swap instruction
pub fn load(&mut self, mem_size: MemSize) -> Load | [src] |
create LOAD instruction, IMMEDIATE is the source
pub fn load_abs(&mut self, mem_size: MemSize) -> Load | [src] |
create ABSOLUTE LOAD instruction
pub fn load_ind(&mut self, mem_size: MemSize) -> Load | [src] |
create INDIRECT LOAD instruction
pub fn load_x(&mut self, mem_size: MemSize) -> Load | [src] |
create LOAD instruction, MEMORY is the source
pub fn store(&mut self, mem_size: MemSize) -> Store | [src] |
creates STORE instruction, IMMEDIATE is the source
pub fn store_x(&mut self, mem_size: MemSize) -> Store | [src] |
creates STORE instruction, MEMORY is the source
pub fn jump_unconditional(&mut self) -> Jump | [src] |
create unconditional JMP instruction
pub fn jump_conditional(&mut self, cond: Cond, src_bit: Source) -> Jump | [src] |
create conditional JMP instruction
pub fn call(&mut self) -> FunctionCall | [src] |
create CALL instruction
pub fn exit(&mut self) -> Exit | [src] |
create EXIT instruction
Trait Implementations
impl<'a> IntoBytes for &'a BpfCode
[src]
impl<'a> IntoBytes for &'a BpfCode
Transform BpfCode
into assemble representation
type Bytes = &'a [u8]
type of targeted transformation
fn into_bytes(self) -> Self::Bytes | [src] |
returns BpfCode
instruction stack as &[u8]
impl Default for BpfCode
[src]
impl Default for BpfCode
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |