pub struct DecodedInsn {
pub addr: VAddr,
pub bytes: [u8; 8],
pub kind: InsnKind,
pub opcode: u8,
pub dst: u8,
pub src: u8,
pub offset: i16,
pub imm: i32,
pub imm64: Option<u64>,
}Expand description
One decoded BPF slot.
Fields§
§addr: VAddr§bytes: [u8; 8]§kind: InsnKind§opcode: u8§dst: u8Destination register (low nibble of byte 1).
src: u8Source register (high nibble of byte 1).
offset: i1616-bit signed offset, little-endian.
imm: i3232-bit signed immediate, little-endian.
imm64: Option<u64>Combined 64-bit immediate — populated only on the first
slot of LDDW (opcode 0x18); None everywhere else.
Implementations§
Trait Implementations§
Source§impl ArchInsn for DecodedInsn
impl ArchInsn for DecodedInsn
Source§fn original_bytes(&self) -> &[u8] ⓘ
fn original_bytes(&self) -> &[u8] ⓘ
Exact bytes the instruction occupied in the source. Used by
Function::emit_bytes to defend round-trip byte identity.Source§impl Clone for DecodedInsn
impl Clone for DecodedInsn
Source§fn clone(&self) -> DecodedInsn
fn clone(&self) -> DecodedInsn
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecodedInsn
impl Debug for DecodedInsn
Source§impl PartialEq for DecodedInsn
impl PartialEq for DecodedInsn
Source§fn eq(&self, other: &DecodedInsn) -> bool
fn eq(&self, other: &DecodedInsn) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for DecodedInsn
impl StructuralPartialEq for DecodedInsn
Auto Trait Implementations§
impl Freeze for DecodedInsn
impl RefUnwindSafe for DecodedInsn
impl Send for DecodedInsn
impl Sync for DecodedInsn
impl Unpin for DecodedInsn
impl UnsafeUnpin for DecodedInsn
impl UnwindSafe for DecodedInsn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more