Enum rune::IrValue[][src]

pub enum IrValue {
    Unit,
    Byte(u8),
    Char(char),
    Bool(bool),
    Integer(BigInt),
    Float(f64),
    String(Shared<String>),
    Option(Shared<Option<IrValue>>),
    Bytes(Shared<Vec<u8>>),
    Vec(Shared<Vec<IrValue>>),
    Tuple(Shared<Box<[IrValue]>>),
    Object(Shared<HashMap<String, IrValue>>),
}
Expand description

A constant value.

Variants

Unit

A constant unit.

Byte

A byte.

Tuple Fields of Byte

0: u8
Char

A character.

Tuple Fields of Char

0: char
Bool

A boolean constant value.

Tuple Fields of Bool

0: bool
Integer

An integer constant.

Tuple Fields of Integer

0: BigInt
Float

An float constant.

Tuple Fields of Float

0: f64
String

A string constant designated by its slot.

Tuple Fields of String

0: Shared<String>
Option

An optional value.

Tuple Fields of Option

0: Shared<Option<IrValue>>
Bytes

A byte string.

Tuple Fields of Bytes

0: Shared<Vec<u8>>
Vec

A vector of values.

Tuple Fields of Vec

0: Shared<Vec<IrValue>>
Tuple

An anonymous tuple.

Tuple Fields of Tuple

0: Shared<Box<[IrValue]>>
Object

An anonymous object.

Tuple Fields of Object

0: Shared<HashMap<String, IrValue>>

Implementations

Convert a constant value into an interpreter value.

Convert into constant value.

Try to coerce into boolean.

Try to coerce into an integer of the specified type.

Get the type information of the value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.