[][src]Struct gf::isa::dec::InsnDecoderState

pub struct InsnDecoderState<'a> { /* fields omitted */ }

Instruction decoder state.

Methods

impl<'a> InsnDecoderState<'a>[src]

pub fn new(processor: &'a Processor<'a>) -> Self[src]

Create a decoder with an empty initial stack.

pub fn clear(&mut self)[src]

Clear the state to an empty initial stack.

pub fn as_insn(&self) -> &Insn[src]

pub fn take_insn(&mut self) -> Insn[src]

Extract decoded Insn from the state and clear it.

pub fn into_insn(self) -> Insn[src]

Convert decoder state to a decoded Insn.

pub fn apply_rule(&mut self, rule: &Rule) -> bool[src]

Apply a Rule.

pub fn apply_rule_action(&mut self, action: &RuleAction) -> bool[src]

Apply a RuleAction.

pub fn apply_rule_case(&mut self, case: &RuleCase) -> bool[src]

Apply a RuleCase.

pub fn stack_item(&self, slot: usize) -> (u128, usize)[src]

Return a stack item, counting from the top.

Errors

  • Panics if the stack does not have enough items.

pub fn stack_item_bit_vec(&self, slot: usize) -> BitVec[src]

Return a stack item as a bit vector, counting from the top.

Errors

  • Panics if the stack does not have enough items.

pub fn stack_push(&mut self, value: (u128, usize))[src]

Push a value onto the stack.

pub fn stack_pop(&mut self, n: usize)[src]

Remove n values from the stack.

Errors

  • Panics if the stack does not have enough items.

Trait Implementations

impl<'a> Clone for InsnDecoderState<'a>[src]

Auto Trait Implementations

impl<'a> Send for InsnDecoderState<'a>

impl<'a> Sync for InsnDecoderState<'a>

impl<'a> Unpin for InsnDecoderState<'a>

impl<'a> UnwindSafe for InsnDecoderState<'a>

impl<'a> RefUnwindSafe for InsnDecoderState<'a>

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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