pub enum BlockItemKind {
Show 14 variants
Clause {
keyword: String,
value: Expr,
},
Assignment {
name: Ident,
value: Expr,
},
ParamAssignment {
name: Ident,
params: Vec<Ident>,
value: Expr,
},
Let {
name: Ident,
value: Expr,
},
EnumVariant {
name: Ident,
backtick_quoted: bool,
},
ForBlock {
binding: ForBinding,
collection: Expr,
filter: Option<Expr>,
items: Vec<BlockItem>,
},
IfBlock {
branches: Vec<CondBlockBranch>,
else_items: Option<Vec<BlockItem>>,
},
PathAssignment {
path: Expr,
value: Expr,
},
OpenQuestion {
text: StringLiteral,
},
ContractsClause {
entries: Vec<ContractBinding>,
},
Annotation(Annotation),
InvariantBlock {
name: Ident,
body: Expr,
},
TransitionsBlock(TransitionGraph),
FieldWithWhen {
name: Ident,
value: Expr,
when_clause: WhenClause,
},
}Variants§
Clause
keyword: value — when:, requires:, ensures:, facing:, etc.
Assignment
name: value — field, relationship, projection, derived value.
ParamAssignment
name(params): value — parameterised derived value.
Let
let name = value
EnumVariant
Bare name inside an enum body — pending, shipped, `de-CH-1996`, etc.
ForBlock
for binding in collection [where filter]: ... at block level (rule iteration)
IfBlock
if condition: ... else if ...: ... else: ... at block level
PathAssignment
Shard.shard_cache: value — dot-path reverse relationship
OpenQuestion
open question "text" (nested within a block)
Fields
text: StringLiteralContractsClause
contracts: clause in a surface body
Fields
entries: Vec<ContractBinding>Annotation(Annotation)
@invariant, @guidance, @guarantee prose annotation
InvariantBlock
invariant Name { expr } inside an entity/value block
TransitionsBlock(TransitionGraph)
transitions field { ... } — transition graph declaration inside an entity
FieldWithWhen
name: Type when status_field = state1 | state2 — field with lifecycle-dependent presence
Trait Implementations§
Source§impl Clone for BlockItemKind
impl Clone for BlockItemKind
Source§fn clone(&self) -> BlockItemKind
fn clone(&self) -> BlockItemKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more