RustUtils
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- RustUtils.type
Members list
Value members
Concrete methods
Helper to determine whether a type can be hashed in Rust. The only types that cannot be hashed are Floats and Functions
Helper to determine whether a type can be hashed in Rust. The only types that cannot be hashed are Floats and Functions
Attributes
- t
a type
- Returns:
a bool describing if it is completely made up of hashable types
Converts TeSSLa type to corresponding rust types
Converts TeSSLa type to corresponding rust types
Attributes
- mask_generics
Replace all generic types with _, resulting in them being inferred by rust. This is needed in anonymous functions, where you cannot specify generic types
- t
Type to be converted. If type is Events[t] the result is equal to calling the function with t.
- wrap_type
In some places we need the underlying type without wrapping it in TesslaValue<...>. For example in type parameters for structs: this way we can define structs such that their fields are guaranteed to be a TesslaValue with their content type as a type parameter.
- Returns:
The converted type
Replaces the type of all fields of a RecordType with TypeParams.
Replaces the type of all fields of a RecordType with TypeParams.
Attributes
- record
The RecordType to modify.
- Returns:
The modified RecordType.
Extracts all TypeParam types used in a list of types, and returns a set of their names.
Extracts all TypeParam types used in a list of types, and returns a set of their names.
Attributes
- types
a list of types
- Returns:
a set of all generic types used
Create a struct name repeatably from the field names
Create a struct name repeatably from the field names
Attributes
- fields
the field names and their types
- Returns:
the name for that struct datatype
Figures out if a struct is a tuple. i.e. has field names _1,_2 ...
Figures out if a struct is a tuple. i.e. has field names _1,_2 ...
Attributes
- fieldNames
The struct field names
- Returns:
Whether given struct is tuple