Enum rtlola_frontend::mir::Type[][src]

pub enum Type {
    Bool,
    Int(IntTy),
    UInt(UIntTy),
    Float(FloatTy),
    String,
    Bytes,
    Tuple(Vec<Type>),
    Option(Box<Type>),
    Function {
        args: Vec<Type>,
        ret: Box<Type>,
    },
}
Expand description

Represents an RTLola value type. This does not including pacing information, for this refer to TimeDrivenStream and EventDrivenStream.

Variants

Bool

A boolean type

Int

An integer type of fixed bit-width

Tuple Fields of Int

0: IntTy
UInt

An unsigned integer type of fixed bit-width

Tuple Fields of UInt

0: UIntTy
Float

A floating point type of fixed bit-width

Tuple Fields of Float

0: FloatTy
String

A unicode string

Bytes

A sequence of 8-bit bytes

Tuple

An n-ary tuples where n is the length of the contained vector

Tuple Fields of Tuple

0: Vec<Type>
Option

An optional value type, e.g., resulting from accessing a past value of a stream

Tuple Fields of Option

0: Box<Type>
Function

A type describing a function

Fields of Function

args: Vec<Type>

The types of the arguments to the function, monomorphized

ret: Box<Type>

The monomorphized return type of the function

Implementations

Indicates how many bytes a type requires to be stored in memory.

Recursive types yield the sum of their sub-type sizes, unsized types panic, and functions do not have a size, so they produce None.

Panics

Panics if the type is an instance of Type::Option, Type::String, or Type::Bytes because their size is undetermined.

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

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

Should always be Self

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

Converts the given value to a String. 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.