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>,
    },
}

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

Variants

Bool

A boolean type

Int(IntTy)

An integer type of fixed bit-width

UInt(UIntTy)

An unsigned integer type of fixed bit-width

Float(FloatTy)

A floating point type of fixed bit-width

String

A unicode string

Bytes

A sequence of 8-bit bytes

Tuple(Vec<Type>)

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

Option(Box<Type>)

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

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

impl Type[src]

pub fn size(&self) -> Option<ValSize>[src]

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

impl Clone for Type[src]

impl Debug for Type[src]

impl Display for Type[src]

impl Eq for Type[src]

impl From<ConcreteValueType> for Type[src]

impl PartialEq<Type> for Type[src]

impl StructuralEq for Type[src]

impl StructuralPartialEq for Type[src]

Auto Trait Implementations

impl RefUnwindSafe for Type

impl Send for Type

impl Sync for Type

impl Unpin for Type

impl UnwindSafe for Type

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.