pub enum MemberAst {
Value {
name: String,
opt: bool,
ty: TypeAst,
dflt: Option<Rc<Expr>>,
annotations: Vec<Annotation>,
loc: Option<Loc>,
},
Derived {
name: String,
ty: Option<TypeAst>,
expr: Rc<Expr>,
hidden: bool,
annotations: Vec<Annotation>,
loc: Option<Loc>,
},
Context {
variable: String,
ty: TypeAst,
annotations: Vec<Annotation>,
loc: Option<Loc>,
},
Assert {
name: String,
cond: Rc<Expr>,
tail: Option<Tail>,
annotations: Vec<Annotation>,
loc: Option<Loc>,
},
When {
cond: Rc<Expr>,
body: Vec<MemberAst>,
annotations: Vec<Annotation>,
loc: Option<Loc>,
},
}Expand description
a member of a record type (§5)
Variants§
Value
a value member: required, optional, or defaulted
Fields
§
annotations: Vec<Annotation>the annotations (§5.10)
Derived
hidden: x$ = e — computed for the schema’s own use, never part of the value (D34)
Context
a context declaration ($parent: ref<P>, §7.3)
Fields
§
annotations: Vec<Annotation>the annotations (§5.10)
Assert
an assertion
Fields
§
annotations: Vec<Annotation>the annotations (§5.10)
When
a guarded group of members (when)
Implementations§
Source§impl MemberAst
impl MemberAst
Sourcepub fn set_annotations(&mut self, a: Vec<Annotation>)
pub fn set_annotations(&mut self, a: Vec<Annotation>)
Attach the annotations (§5.10).
Sourcepub fn annotations(&self) -> &[Annotation]
pub fn annotations(&self) -> &[Annotation]
the annotations (§5.10)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MemberAst
impl !Send for MemberAst
impl !Sync for MemberAst
impl !UnwindSafe for MemberAst
impl Freeze for MemberAst
impl Unpin for MemberAst
impl UnsafeUnpin for MemberAst
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