[][src]Struct cranelift_codegen::isa::Encodings

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

An iterator over legal encodings for the instruction.

Methods

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

pub fn new(
    offset: usize,
    legalize: u8,
    inst: &'a InstructionData,
    func: &'a Function,
    enclist: &'static [u16],
    legalize_actions: &'static [Legalize],
    recipe_preds: &'static [Option<fn(_: PredicateView, _: &InstructionData) -> bool>],
    inst_preds: &'static [fn(_: &Function, _: &InstructionData) -> bool],
    isa_preds: PredicateView<'a>
) -> Self
[src]

Creates a new instance of Encodings.

This iterator provides search for encodings that applies to the given instruction. The encoding lists are laid out such that first call to next returns valid entry in the list or None.

pub fn legalize(&self) -> Legalize[src]

Get the legalization action that caused the enumeration of encodings to stop. This can be the default legalization action for the type or a custom code for the instruction.

This method must only be called after the iterator returns None.

Trait Implementations

impl<'a> Iterator for Encodings<'a>[src]

type Item = Encoding

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Encodings<'a>

impl<'a> Send for Encodings<'a>

impl<'a> Sync for Encodings<'a>

impl<'a> Unpin for Encodings<'a>

impl<'a> UnwindSafe for Encodings<'a>

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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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.