[][src]Enum llhd::ValueRef

pub enum ValueRef {
    Inst(InstRef),
    Block(BlockRef),
    Argument(ArgumentRef),
    Function(FunctionRef),
    Process(ProcessRef),
    Entity(EntityRef),
    Global,
    Const(Const),
}

A reference to a value in a module.

Variants

Inst(InstRef)Block(BlockRef)Argument(ArgumentRef)Function(FunctionRef)Process(ProcessRef)Entity(EntityRef)GlobalConst(Const)

Methods

impl ValueRef
[src]

pub fn into_const(self) -> Const
[src]

Convert this value reference into the constant it contains. Panics if the value reference does not contain a constant.

pub fn as_const(&self) -> &Const
[src]

Unwrap and return a reference to the constant represented by this value reference. Panics if the value reference does not contain a constant.

pub fn id(&self) -> Option<ValueId>
[src]

Obtain the ID of the value this reference points to, or None if the value has no ID (e.g. if it is a constant).

pub fn unwrap_inst(&self) -> InstRef
[src]

Unwrap this reference as an instruction.

Panics if this is not an instruction.

pub fn unwrap_block(&self) -> BlockRef
[src]

Unwrap this reference as a block.

Panics if this is not a block.

pub fn unwrap_argument(&self) -> ArgumentRef
[src]

Unwrap this reference as an argument.

Panics if this is not an argument.

pub fn unwrap_function(&self) -> FunctionRef
[src]

Unwrap this reference as a function.

Panics if this is not a function.

pub fn unwrap_process(&self) -> ProcessRef
[src]

Unwrap this reference as a process.

Panics if this is not a process.

pub fn unwrap_entity(&self) -> EntityRef
[src]

Unwrap this reference as an entity.

Panics if this is not an entity.

Trait Implementations

impl Into<ValueRef> for FunctionRef
[src]

impl Into<ValueRef> for ProcessRef
[src]

impl Into<ValueRef> for EntityRef
[src]

impl Into<ValueRef> for ArgumentRef
[src]

impl Into<ValueRef> for BlockRef
[src]

impl Into<ValueRef> for InstRef
[src]

impl Into<ValueRef> for Const
[src]

impl Clone for ValueRef
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for ValueRef
[src]

Auto Trait Implementations

impl Send for ValueRef

impl Sync for ValueRef

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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