Enum cardinal_backend::value::Value[][src]

pub enum Value {
    I8(i8),
    I16(i16),
    I32(i32),
    I64(i64),
    U8(u8),
    U16(u16),
    U32(u32),
    U64(u64),
    B1(bool),
    Variable(Variable),
}
Expand description

Basic inbuilt types for Cardinal’s IR. ValueType is used for type definitions.

Variants

I8(i8)

Integer with a maximum value of 255 and a minimum value of -255

I16(i16)

Integer with a maximum value of 65,536 and a minimum value of -65,536

I32(i32)

Integer with a maximum value of 65536^2 and a minimum value of -65,536^2

I64(i64)

Integer with a maximum value of 65536^4 and a minimum value of -65,536^4

U8(u8)

Unsigned integer with a maximum value of 255 and a minimum value of 0

U16(u16)

Unsigned integer with a maximum value of 65,536 and a minimum value of 0

U32(u32)

Unsigned integer with a maximum value of 65536^2 and a minimum value of 0

U64(u64)

Unsigned integer with a maximum value of 65536^4 and a minimum value of 0

B1(bool)

Boolean-style integer with a maximum value of 1 and a minimum value of 0

Variable(Variable)

A variable reference.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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.