[][src]Enum peepmatic_runtime::part::Part

pub enum Part<I> where
    I: Copy + Debug + Eq
{ Instruction(I), Constant(Constant), ConditionCode(ConditionCode), }

A part of an instruction, or a whole instruction itself.

These are the different values that can be matched in an optimization's left-hand side and then built up in its right-hand side.

Variants

Instruction(I)

An instruction (or result of an instruction).

Constant(Constant)

A constant value.

ConditionCode(ConditionCode)

A condition code.

Implementations

impl<I> Part<I> where
    I: Copy + Debug + Eq
[src]

pub fn as_instruction(&self) -> Option<I>[src]

pub fn is_instruction(&self) -> bool[src]

pub fn unwrap_instruction(&self) -> I[src]

pub fn as_constant(&self) -> Option<Constant>[src]

pub fn is_constant(&self) -> bool[src]

pub fn unwrap_constant(&self) -> Constant[src]

pub fn as_condition_code(&self) -> Option<ConditionCode>[src]

pub fn is_condition_code(&self) -> bool[src]

pub fn unwrap_condition_code(&self) -> ConditionCode[src]

Trait Implementations

impl<I: Clone> Clone for Part<I> where
    I: Copy + Debug + Eq
[src]

impl<I: Copy> Copy for Part<I> where
    I: Copy + Debug + Eq
[src]

impl<I: Debug> Debug for Part<I> where
    I: Copy + Debug + Eq
[src]

impl<I: Eq> Eq for Part<I> where
    I: Copy + Debug + Eq
[src]

impl<I> From<ConditionCode> for Part<I> where
    I: Copy + Debug + Eq
[src]

impl<I> From<Constant> for Part<I> where
    I: Copy + Debug + Eq
[src]

impl<I: PartialEq> PartialEq<Part<I>> for Part<I> where
    I: Copy + Debug + Eq
[src]

impl<I> StructuralEq for Part<I> where
    I: Copy + Debug + Eq
[src]

impl<I> StructuralPartialEq for Part<I> where
    I: Copy + Debug + Eq
[src]

Auto Trait Implementations

impl<I> RefUnwindSafe for Part<I> where
    I: RefUnwindSafe

impl<I> Send for Part<I> where
    I: Send

impl<I> Sync for Part<I> where
    I: Sync

impl<I> Unpin for Part<I> where
    I: Unpin

impl<I> UnwindSafe for Part<I> where
    I: UnwindSafe

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.