Expand description
Each of the valid Value
types.
These generally mimic the Sway types with a couple of exceptions:
- [
Type::Unit
] is still a discrete type rather than an empty tuple. This may change in the future. - [
Type::Union
] is a sum type which resembles a C union. Each member of the union uses the same storage and the size of the union is the size of the largest member.
[Aggregate
] is an abstract collection of Type
s used for structs, unions and arrays,
though see below for future improvements around splitting arrays into a different construct.
Structs
Enums
Traits
- A helper to check if an Option
value is of a particular Type.