Skip to main content

OperandKind

Enum OperandKind 

Source
pub enum OperandKind {
Show 24 variants U8, S8, U16, S32, Argc8, Argc16, Local8, Local16, Arg8, Arg16, String, List, Object, Property, Function, Enum, Branch, TableOffset, Metaclass8, Metaclass16, FunctionSet8, FunctionSet16, FunctionIndex8, FunctionIndex16,
}
Expand description

The kind and size of one fixed operand.

Variants§

§

U8

Unsigned 8-bit number.

§

S8

Signed 8-bit number.

§

U16

Unsigned 16-bit number.

§

S32

Signed 32-bit number.

§

Argc8

Argument count, 8 bits.

§

Argc16

Argument count, 16 bits.

§

Local8

Local variable number, 8 bits.

§

Local16

Local variable number, 16 bits.

§

Arg8

Parameter number, 8 bits.

§

Arg16

Parameter number, 16 bits.

§

String

Constant pool offset of a string, 32 bits.

§

List

Constant pool offset of a list, 32 bits.

§

Object

Object ID, 32 bits.

§

Property

Property ID, 16 bits.

§

Function

Code pool offset of a function, 32 bits.

§

Enum

Enumerator ID, 32 bits.

§

Branch

Signed 16-bit branch offset, relative to the operand’s own address.

§

TableOffset

Unsigned 16-bit offset to a named argument table, relative to the operand’s own address.

§

Metaclass8

Index into the image’s metaclass dependency list, 8 bits.

§

Metaclass16

Index into the image’s metaclass dependency list, 16 bits.

§

FunctionSet8

Index into the image’s function set dependency list, 8 bits.

§

FunctionSet16

Index into the image’s function set dependency list, 16 bits.

§

FunctionIndex8

Index of a function within its function set, 8 bits.

§

FunctionIndex16

Index of a function within its function set, 16 bits.

Implementations§

Source§

impl OperandKind

Source

pub const fn size(self) -> usize

Encoded size in bytes.

Trait Implementations§

Source§

impl Clone for OperandKind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for OperandKind

Source§

impl Debug for OperandKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for OperandKind

Source§

impl PartialEq for OperandKind

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OperandKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.