[][src]Enum cranelift_codegen_meta::cdsl::ast::Literal

pub(crate) enum Literal {
    Enumerator {
        rust_type: &'static str,
        value: &'static str,
    },
    Bits {
        rust_type: &'static str,
        value: u64,
    },
    Int(i64),
    EmptyVarArgs,
}

Variants

Enumerator

A value of an enumerated immediate operand.

Some immediate operand kinds like intcc and floatcc have an enumerated range of values corresponding to a Rust enum type. An Enumerator object is an AST leaf node representing one of the values.

Fields of Enumerator

rust_type: &'static strvalue: &'static str
Bits

A bitwise value of an immediate operand, used for bitwise exact floating point constants.

Fields of Bits

rust_type: &'static strvalue: u64
Int(i64)

A value of an integer immediate operand.

EmptyVarArgs

A empty list of variable set of arguments.

Methods

impl Literal[src]

pub fn enumerator_for(kind: &OperandKind, value: &'static str) -> Self[src]

pub fn bits(kind: &OperandKind, bits: u64) -> Self[src]

pub fn constant(kind: &OperandKind, value: i64) -> Self[src]

pub fn empty_vararg() -> Self[src]

pub fn to_rust_code(&self) -> String[src]

Trait Implementations

impl Clone for Literal[src]

impl Debug for Literal[src]

impl Into<DummyExpr> for Literal[src]

Auto Trait Implementations

impl RefUnwindSafe for Literal

impl Send for Literal

impl Sync for Literal

impl Unpin for Literal

impl UnwindSafe for Literal

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.