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
Value parameters
- t
-
a type
Attributes
- 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
Value parameters
- 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.
Attributes
- 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.
Value parameters
- record
-
The RecordType to modify.
Attributes
- 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.
Value parameters
- types
-
a list of types
Attributes
- 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
Value parameters
- fields
-
the field names and their types
Attributes
- 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 ...
Value parameters
- fieldNames
-
The struct field names
Attributes
- Returns
-
Whether given struct is tuple