pub struct FieldSpec {
pub name: &'static str,
pub kind: FieldKind,
pub slot: Slot,
}Expand description
One operand of an opcode: its field name, its kind, and its slot.
§Examples
use bytecode_lang::{FieldKind, Opcode, Slot};
let fields = Opcode::Mov.fields();
assert_eq!(fields[0].name, "dst");
assert_eq!((fields[0].kind, fields[0].slot), (FieldKind::Reg, Slot::B));Fields§
§name: &'static strThe Inst field’s name.
kind: FieldKindWhat the field is.
slot: SlotWhere it lives in the instruction word.
Trait Implementations§
impl Copy for FieldSpec
impl Eq for FieldSpec
Source§impl Ord for FieldSpec
impl Ord for FieldSpec
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for FieldSpec
impl PartialOrd for FieldSpec
impl StructuralPartialEq for FieldSpec
Auto Trait Implementations§
impl Freeze for FieldSpec
impl RefUnwindSafe for FieldSpec
impl Send for FieldSpec
impl Sync for FieldSpec
impl Unpin for FieldSpec
impl UnsafeUnpin for FieldSpec
impl UnwindSafe for FieldSpec
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