Enum rtlola_frontend::mir::Type
source · 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(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
Fields
A type describing a function
Implementations§
source§impl Type
impl Type
sourcepub fn size(&self) -> Option<ValSize>
pub fn size(&self) -> Option<ValSize>
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§
source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<ConcreteValueType> for Type
impl From<ConcreteValueType> for Type
source§fn from(ty: ConcreteValueType) -> Type
fn from(ty: ConcreteValueType) -> Type
source§impl PartialEq<Type> for Type
impl PartialEq<Type> for Type
impl Eq for Type
impl StructuralEq for Type
impl StructuralPartialEq for Type
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§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.