pub fn to_vec(&self) -> Vec<u8> {
        vec![
            self.opc,
            self.src.wrapping_shl(4) | self.dst,
            (self.off & 0xff) as u8,
            self.off.wrapping_shr(8) as u8,
            (self.imm & 0xff) as u8,
            (self.imm & 0xff_00).wrapping_shr(8) as u8,
            (self.imm as u32 & 0xff_00_00).wrapping_shr(16) as u8,
            (self.imm as u32 & 0xff_00_00_00).wrapping_shr(24) as u8,
        ]
    }
/// Turn an `Insn` into an vector of bytes.
///
/// # Examples
///
/// ```
/// use solana_rbpf::ebpf;
///
/// let prog: Vec<u8> = vec![
///     0xb7, 0x12, 0x56, 0x34, 0xde, 0xbc, 0x9a, 0x78,
///     ];
/// let insn = ebpf::Insn {
///     opc: 0xb7,
///     dst: 2,
///     src: 1,
///     off: 0x3456,
///     imm: 0x789abcde
/// };
/// assert_eq!(insn.to_vec(), prog);
/// ```
Turn an `Insn` into an vector of bytes.
Turn an ` Insn ` into an vector of bytes .
pub fn to_vec(&self) -> Vec<u8> {
        vec![
            self.opc,
            self.src.wrapping_shl(4) | self.dst,
            (self.off & 0xff) as u8,
            self.off.wrapping_shr(8) as u8,
            (self.imm & 0xff) as u8,
            (self.imm & 0xff_00).wrapping_shr(8) as u8,
            (self.imm as u32 & 0xff_00_00).wrapping_shr(16) as u8,
            (self.imm as u32 & 0xff_00_00_00).wrapping_shr(24) as u8,
        ]
    }
pub fn to_vec ( & self ) -> Vec < u8 > { vec ! [ self opc self src wrapping_shl ( 4 ) self dst ( self off 0xff ) as u8 self off wrapping_shr ( 8 ) as u8 ( self imm 0xff ) as u8 ( self imm 0xff_00 ) wrapping_shr ( 8 ) as u8 ( self imm as u32 0xff_00_00 ) wrapping_shr ( 16 ) as u8 ( self imm as u32 0xff_00_00_00 ) wrapping_shr ( 24 ) as u8 ] }
Turn an `Insn` into an vector of bytes.
Turn an ` Insn ` into an vector of bytes .
&self
examples
```
use solana_rbpf::ebpf.


` ` ` use solana_rbpf :: ebpf .