pub enum Type {
Show 34 variants
I8,
I16,
I32,
I64,
U8,
U16,
U32,
U64,
F32,
F64,
Decimal,
Char,
Bool,
String,
Object,
Dynamic,
Void,
Null,
Text,
Unit(String),
Content(String),
Tag,
Own(String, Vec<Type>),
Param(String),
Static(String),
Game(String),
Yog(String),
Namespace(String),
List(Box<Type>),
Map(Box<Type>, Box<Type>),
Tuple(Vec<Type>),
Fn(Vec<Type>, Box<Type>),
Nullable(Box<Type>),
Unknown,
}Expand description
A type.
Variants§
I8
I16
I32
I64
U8
U16
U32
U64
F32
F64
Decimal
Char
Bool
String
Object
object: every type converts to it.
Dynamic
dynamic: checked when the code runs, not here.
Void
Null
null before it meets a type.
Text
Translatable text: t"key".
Unit(String)
A quantity with a unit: Ticks, Seconds, Blocks, a mod’s own.
Content(String)
A content reference of a kind: @item:… is Content("item").
Tag
Own(String, Vec<Type>)
A type the source declares, by name, with its type arguments
(Box<i32>; none when it isn’t generic).
Param(String)
A type parameter (T) where its argument isn’t known: in its
generic’s own code, or a method’s before inference.
Static(String)
An own type named where a value goes (Mode in Mode.Idle): its
static members and its cases.
Game(String)
A game class, by its internal name (.yns only).
Yog(String)
Yog’s: a handle (Player), a domain’s group (Chat), a struct or
an enum an action answers with — by name.
Namespace(String)
A namespace (Game.World), on the way to what’s in it.
List(Box<Type>)
Map(Box<Type>, Box<Type>)
Tuple(Vec<Type>)
Fn(Vec<Type>, Box<Type>)
A delegate: Action<A, B> (its result void), Func<A, R>.
Nullable(Box<Type>)
Unknown
Not known here (the library’s, or what couldn’t be typed): checks involving it pass, so one gap doesn’t cascade.