Enum rune_ssa::Constant[][src]

pub enum Constant {
    Unit,
    Bool(bool),
    Char(char),
    Byte(u8),
    Integer(i64),
    Float(NotNan<f64>),
    String(Box<str>),
    Bytes(Box<[u8]>),
}

A constant value.

Variants

Unit

The unit constant (always has constant id = 0).

Bool(bool)

A boolean constant.

Char(char)

A character constant.

Byte(u8)

A byte constant.

Integer(i64)

An integer constant.

Float(NotNan<f64>)

A float constant.

String(Box<str>)

A string constant.

Bytes(Box<[u8]>)

A byte constant.

Implementations

impl Constant[src]

pub fn float(f: f64) -> Result<Self, Error>[src]

Construct a float constant and error if it can’t be constructed.

Trait Implementations

impl Clone for Constant[src]

impl Debug for Constant[src]

impl Eq for Constant[src]

impl Hash for Constant[src]

impl PartialEq<Constant> for Constant[src]

impl StructuralEq for Constant[src]

impl StructuralPartialEq for Constant[src]

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> CallHasher for T where
    T: Hash

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.