[][src]Enum ni::common::Operand

pub enum Operand {
    Loc(UWord),
    Ind(UWord),
    Ret(UWord),
    Val(UWord),
    Ref(UWord),
    Glb(UWord),
    Emp,
}

Variants

Loc(UWord)

Local variable.

Expressed as x or loc(12).

Ind(UWord)

Indirection access.

Expressed as *x or ind(12).

Ret(UWord)

Return variable.

Expressed as ^x or ret(12).

Val(UWord)

Constant value.

Expressed as 12 or val(12).

Ref(UWord)

Variable reference.

Expressed as &x or ref(12).

Glb(UWord)

Global variable.

Expressed as .x or glb(12).

Emp

Empty.

Expressed as emp.

Implementations

impl Operand[src]

pub fn new(val: UWord, kind: u8) -> Result<Self, UndefinedOperation>[src]

pub fn as_byte(&self) -> u8[src]

pub fn get(self) -> Option<UWord>[src]

pub fn map<F>(self, f: F) -> Self where
    F: FnOnce(UWord) -> UWord
[src]

Trait Implementations

impl Clone for Operand[src]

impl Copy for Operand[src]

impl Debug for Operand[src]

impl Decode<()> for Operand[src]

type Err = DecodeError

impl Encode for Operand[src]

type Err = EncodeError

impl Eq for Operand[src]

impl From<u8> for Operand[src]

impl PartialEq<Operand> for Operand[src]

impl StructuralEq for Operand[src]

impl StructuralPartialEq for Operand[src]

Auto Trait Implementations

impl RefUnwindSafe for Operand

impl Send for Operand

impl Sync for Operand

impl Unpin for Operand

impl UnwindSafe for Operand

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.