pub enum Type {
    Bool,
    Int(IntTy),
    UInt(UIntTy),
    Float(FloatTy),
    String,
    Bytes,
    Tuple(Vec<Type, Global>),
    Option(Box<Type, Global>),
    Function {
        args: Vec<Type, Global>,
        ret: Box<Type, Global>,
    },
}
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(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, Global>)

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

§

Option(Box<Type, Global>)

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

§

Function

Fields

§args: Vec<Type, Global>

The types of the arguments to the function, monomorphized

§ret: Box<Type, Global>

The monomorphized return type of the function

A type describing a 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
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. 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
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.