pub enum TypeInfo {
Show 18 variants
Unknown,
UnknownGeneric {
name: Ident,
},
Str(u64),
UnsignedInteger(IntegerBits),
Enum {
name: String,
variant_types: Vec<OwnedTypedEnumVariant>,
},
Struct {
name: String,
fields: Vec<OwnedTypedStructField>,
},
Boolean,
Ref(TypeId),
Tuple(Vec<TypeId>),
ContractCaller {
abi_name: OwnedCallPath,
address: String,
},
Custom {
name: Ident,
},
SelfType,
Byte,
B256,
Numeric,
Contract,
ErrorRecovery,
Array(TypeId, usize),
}Expand description
Type information without an associated value, used for type inferencing and definition.
Variants
Unknown
UnknownGeneric
Fields
name: IdentStr(u64)
UnsignedInteger(IntegerBits)
Enum
Struct
Boolean
Ref(TypeId)
For the type inference engine to use when a type references another type
Tuple(Vec<TypeId>)
ContractCaller
Represents a type which contains methods to issue a contract call.
The specific contract is identified via the Ident within.
Custom
Fields
name: IdentA custom type could be a struct or similar if the name is in scope, or just a generic parameter if it is not. At parse time, there is no sense of scope, so this determination is not made until the semantic analysis stage.
SelfType
Byte
B256
Numeric
This means that specific type of a number is not yet known. It will be determined via inference at a later time.
Contract
ErrorRecovery
Array(TypeId, usize)
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TypeInfo
impl UnwindSafe for TypeInfo
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.