pub enum AstNode {
Show 28 variants
Export(Box<Spanned<AstNode>>),
Entity {
name: String,
version: Option<String>,
annotations: HashMap<String, Value>,
domain: Option<String>,
body: Option<EntityBody>,
},
Resource {
name: String,
annotations: HashMap<String, Value>,
unit_name: Option<String>,
domain: Option<String>,
},
Record(RecordDecl),
Enum(EnumDecl),
Operation(OperationDecl),
Flow {
resource_name: String,
annotations: HashMap<String, Value>,
from_entity: String,
to_entity: String,
quantity: Option<Decimal>,
},
Pattern {
name: String,
regex: String,
},
Role {
name: String,
domain: Option<String>,
},
Relation {
name: String,
subject_role: String,
predicate: String,
object_role: String,
via_flow: Option<String>,
},
Dimension {
name: String,
},
UnitDeclaration {
symbol: String,
dimension: String,
factor: Decimal,
base_unit: String,
},
Policy {
name: String,
version: Option<String>,
metadata: PolicyMetadata,
expression: Expression,
},
Instance {
name: String,
entity_type: String,
fields: HashMap<String, Expression>,
},
ConceptChange {
name: String,
from_version: String,
to_version: String,
migration_policy: String,
breaking_change: bool,
},
Metric {
name: String,
expression: Expression,
metadata: MetricMetadata,
},
MappingDecl {
name: String,
target: TargetFormat,
rules: Vec<MappingRule>,
},
ProjectionDecl {
name: String,
target: TargetFormat,
overrides: Vec<ProjectionOverride>,
},
Cell {
name: String,
annotations: HashMap<String, Value>,
},
SystemDependency {
name: String,
version: Option<String>,
annotations: HashMap<String, Value>,
},
Runtime {
name: String,
version: String,
annotations: HashMap<String, Value>,
},
Tool {
name: String,
version: String,
annotations: HashMap<String, Value>,
},
DependencySet {
name: String,
annotations: HashMap<String, Value>,
},
Service {
name: String,
version: Option<String>,
annotations: HashMap<String, Value>,
},
Mount {
name: String,
annotations: HashMap<String, Value>,
},
Endpoint {
name: String,
annotations: HashMap<String, Value>,
},
NetworkFlow {
name: String,
from_ref: String,
to_ref: String,
annotations: HashMap<String, Value>,
},
Credential {
name: String,
annotations: HashMap<String, Value>,
},
}Expand description
AST Node types
Variants§
Export(Box<Spanned<AstNode>>)
Entity
Fields
§
body: Option<EntityBody>Optional typed body entity "X" { ... }. Absent for legacy
bodyless entities.
Resource
Fields
Record(RecordDecl)
Enum(EnumDecl)
Operation(OperationDecl)
Flow
Fields
Pattern
Role
Relation
Fields
Dimension
UnitDeclaration
Policy
Instance
ConceptChange
Fields
Metric
MappingDecl
ProjectionDecl
Cell
SystemDependency
Runtime
Tool
DependencySet
Service
Mount
Endpoint
NetworkFlow
Credential
Trait Implementations§
impl StructuralPartialEq for AstNode
Auto Trait Implementations§
impl Freeze for AstNode
impl RefUnwindSafe for AstNode
impl Send for AstNode
impl Sync for AstNode
impl Unpin for AstNode
impl UnsafeUnpin for AstNode
impl UnwindSafe for AstNode
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