Struct solana_rbpf::insn_builder::BpfCode [−][src]
BPF instruction stack in byte representation
Implementations
impl BpfCode
[src]
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 Default for BpfCode
[src]
impl<'a> IntoBytes for &'a BpfCode
[src]
Transform BpfCode
into assemble representation
Auto Trait Implementations
impl RefUnwindSafe for BpfCode
impl Send for BpfCode
impl Sync for BpfCode
impl Unpin for BpfCode
impl UnwindSafe for BpfCode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,