pub enum DeclKind {
Show 23 variants
Using(Vec<Name>),
Alias {
name: Name,
ty: Type,
},
Mod {
name: Name,
props: Vec<Prop>,
},
Method(Method),
Field(Field),
Property {
ty: Type,
name: Name,
accessors: Vec<Accessor>,
value: Option<Expr>,
},
Ctor(Ctor),
Type {
word: Name,
name: Name,
header: TypeHeader,
body: Vec<Decl>,
},
Union {
name: Name,
generics: Vec<Name>,
variants: Vec<Variant>,
body: Vec<Decl>,
},
Enum {
name: Name,
cases: Vec<Name>,
},
Unit {
name: Name,
value: Option<Expr>,
},
Content {
kind: Name,
name: Name,
header: TypeHeader,
body: Vec<Decl>,
},
Component {
name: Name,
header: TypeHeader,
body: Vec<Decl>,
},
System {
name: Name,
params: Vec<Param>,
every: Option<Expr>,
body: Block,
},
Extend {
ty: Type,
header: TypeHeader,
body: Vec<Decl>,
},
Prop(Prop),
Screen {
name: Name,
header: TypeHeader,
ui: String,
body: Vec<Decl>,
},
Command {
name: String,
body: Vec<Decl>,
},
On {
event: Vec<Name>,
params: Vec<Param>,
body: Block,
},
Test {
name: String,
body: Block,
},
Version {
cond: VersionCond,
then: Vec<Decl>,
otherwise: Option<Vec<Decl>>,
},
Native {
library: String,
methods: Vec<Method>,
},
Patch(Patch),
}Variants§
Using(Vec<Name>)
using Yog.Ui;.
Alias
using Grid = Dictionary<Pos, int>;.
Mod
mod Charge { Version = "1.0.0"; … }.
Method(Method)
Field(Field)
Property
Ticks Left { get; set; }, Energy Room => …;.
Ctor(Ctor)
Type
class, record, interface: which is word.
Union
Enum
Unit
unit Energy; / unit FE = Energy * 1;.
Content
block Charger has Charge(1000) { … }, recipe Battery : Shaped { … },
a mod’s own kinds.
Component
System
server system Solar(Charge charge, Block block) every 1t { … }.
Extend
Prop(Prop)
Hardness = 2.0f; in a content or mod body.
Screen
Command
On
on Player.Join(Player player) { … }, on Use(Player player) { … }.
Test
Version
Native
Patch(Patch)
Trait Implementations§
impl StructuralPartialEq for DeclKind
Auto Trait Implementations§
impl Freeze for DeclKind
impl RefUnwindSafe for DeclKind
impl Send for DeclKind
impl Sync for DeclKind
impl Unpin for DeclKind
impl UnsafeUnpin for DeclKind
impl UnwindSafe for DeclKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more