pub enum DeclBody {
Type {
name: String,
params: Vec<Param>,
ty: TypeAst,
tail: Option<Tail>,
},
Const {
name: String,
ty: Option<TypeAst>,
expr: Rc<Expr>,
},
Func {
name: String,
params: Vec<Param>,
ret: Option<TypeAst>,
body: Rc<Expr>,
},
Output {
name: String,
ty: TypeAst,
expr: Rc<Expr>,
},
Input {
name: String,
ty: TypeAst,
fallback: Option<Rc<Expr>>,
},
Diagnostic {
name: String,
params: Vec<Param>,
severity: String,
template: Vec<TPart>,
},
Dimension {
name: String,
terms: Option<Vec<(String, i32)>>,
},
Unit {
name: String,
dim: Option<String>,
factor: Option<Rc<Expr>>,
base: Option<String>,
},
Import {
from: String,
names: Option<Vec<ImportItem>>,
ns: Option<String>,
},
ReExport {
from: String,
names: Vec<ImportItem>,
},
}Expand description
a declaration (§5, §8)
Variants§
Type
a type
Fields
Const
a constant
Fields
Func
a function
Fields
Output
an output root
Input
an input root
Fields
Diagnostic
a diagnostic template
Fields
Dimension
a dimension
Fields
Unit
a unit
Fields
Import
an import
Fields
§
names: Option<Vec<ImportItem>>the names imported; none for a namespace import
ReExport
a re-export
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DeclBody
impl !Send for DeclBody
impl !Sync for DeclBody
impl !UnwindSafe for DeclBody
impl Freeze for DeclBody
impl Unpin for DeclBody
impl UnsafeUnpin for DeclBody
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