[][src]Enum cranelift_reader::DataValue

pub enum DataValue {
    B(bool),
    I8(i8),
    I16(i16),
    I32(i32),
    I64(i64),
    F32(f32),
    F64(f64),
    V128([u8; 16]),
}

Represent a data value. Where Value is an SSA reference, DataValue is the type + value that would be referred to by a Value.

Variants

B(bool)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
F32(f32)
F64(f64)
V128([u8; 16])

Implementations

impl DataValue[src]

pub fn from_integer(
    imm: Imm64,
    ty: Type
) -> Result<DataValue, DataValueCastFailure>
[src]

Try to cast an immediate integer (Imm64) to the given Cranelift Type.

pub fn ty(&self) -> Type[src]

Return the Cranelift IR Type for this DataValue.

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

Return true if the value is a vector (i.e. DataValue::V128).

Trait Implementations

impl Clone for DataValue[src]

impl Debug for DataValue[src]

impl Display for DataValue[src]

impl From<[u8; 16]> for DataValue[src]

impl From<bool> for DataValue[src]

impl From<f32> for DataValue[src]

impl From<f64> for DataValue[src]

impl From<i16> for DataValue[src]

impl From<i32> for DataValue[src]

impl From<i64> for DataValue[src]

impl From<i8> for DataValue[src]

impl PartialEq<DataValue> for DataValue[src]

impl StructuralPartialEq for DataValue[src]

impl TryInto<[u8; 16]> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<bool> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<f32> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<f64> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<i16> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<i32> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<i64> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<i8> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

Auto Trait Implementations

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> ToString for T where
    T: Display + ?Sized
[src]

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.