ab_riscv_primitives/
instructions.rs1pub mod rv32;
4pub mod rv64;
5#[cfg(test)]
6mod test_utils;
7pub mod utils;
8pub mod v;
9pub mod zicond;
10pub mod zicsr;
11pub mod zvbb;
12pub mod zvbc;
13
14use crate::registers::general_purpose::Register;
15use core::fmt;
16use core::marker::Destruct;
17
18pub const trait Instruction:
20 fmt::Display + fmt::Debug + [const] Destruct + Copy + Send + Sync + Sized
21{
22 type Reg: Register;
24
25 fn try_decode(instruction: u32) -> Option<Self>;
27
28 fn alignment() -> u8;
30
31 fn size(&self) -> u8;
33}