#[non_exhaustive]pub enum OperandKind {
Show 17 variants
InlineNone,
InlineI,
ShortInlineI,
InlineI8,
ShortInlineR,
InlineR,
InlineBrTarget,
ShortInlineBrTarget,
InlineSwitch,
InlineMethod,
InlineField,
InlineType,
InlineTok,
InlineString,
InlineSig,
InlineVar,
ShortInlineVar,
}Expand description
The shape of an instruction operand (ECMA-335 VI.C).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InlineNone
No operand.
InlineI
A 4-byte signed integer.
ShortInlineI
A 1-byte signed integer.
InlineI8
An 8-byte signed integer.
ShortInlineR
A 4-byte IEEE float.
InlineR
An 8-byte IEEE float.
InlineBrTarget
A 4-byte signed branch delta.
ShortInlineBrTarget
A 1-byte signed branch delta.
InlineSwitch
A 4-byte count followed by that many 4-byte branch deltas.
InlineMethod
A MethodDef, MemberRef or MethodSpec token.
InlineField
A Field or MemberRef token.
InlineType
A TypeDef, TypeRef or TypeSpec token.
InlineTok
Any metadata token.
InlineString
A #US token.
InlineSig
A StandAloneSig token.
InlineVar
A 2-byte local or argument index.
ShortInlineVar
A 1-byte local or argument index.
Implementations§
Source§impl OperandKind
impl OperandKind
Sourcepub const fn fixed_size(self) -> Option<usize>
pub const fn fixed_size(self) -> Option<usize>
The fixed operand size in bytes, or None for OperandKind::InlineSwitch,
whose size depends on the encoded count.
Trait Implementations§
Source§impl Clone for OperandKind
impl Clone for OperandKind
impl Copy for OperandKind
Source§impl Debug for OperandKind
impl Debug for OperandKind
impl Eq for OperandKind
Source§impl Hash for OperandKind
impl Hash for OperandKind
Source§impl Ord for OperandKind
impl Ord for OperandKind
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 PartialEq for OperandKind
impl PartialEq for OperandKind
Source§impl PartialOrd for OperandKind
impl PartialOrd for OperandKind
impl StructuralPartialEq for OperandKind
Auto Trait Implementations§
impl Forget for OperandKind
impl Freeze for OperandKind
impl Move for OperandKind
impl RefUnwindSafe for OperandKind
impl Send for OperandKind
impl Sync for OperandKind
impl Unpin for OperandKind
impl UnsafeUnpin for OperandKind
impl UnwindSafe for OperandKind
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