Enum umbra_lang::Type [−][src]
pub enum Type {
Show 13 variants
None,
Any,
Type,
Reference(Arc<Type>),
Number,
String,
List(Arc<Type>),
Map(Arc<Type>, Arc<Type>),
Enum(Arc<Vec<(String, Arc<Type>)>>),
Struct(Arc<HashableMap<String, Arc<Type>>>),
Generic(Arc<Type>, Arc<HashableMap<String, Arc<Type>>>),
Function {
args: Arc<Vec<(String, Arc<Type>)>>,
ret: Arc<Type>,
},
Thread(Arc<Type>),
}
Expand description
A representation of a kind of Value
. Most variants just represent the
corresponding Value
variants.
The below associated functions return cloned Arc
s to defaults.
Variants
Null type, only to be used internally. For external code, use an Option
.
Used by generics to accept any type. This is available as _
but
generally prefer generic
instead.
A pair of the underlying type and a map of generic parameter types.
This doesn’t correspond to a Value
variant since the actual type it
should act as is valid.
Implementations
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Type
impl UnwindSafe for Type
Blanket Implementations
Mutably borrows from an owned value. Read more