pub enum AstNode {
Show 15 variants
Export {
declaration: Box<SpannedAstNode>,
},
Entity {
name: String,
version: Option<String>,
annotations: HashMap<String, Value>,
domain: Option<String>,
},
Resource {
name: String,
annotations: HashMap<String, Value>,
unit_name: Option<String>,
domain: Option<String>,
},
Flow {
resource_name: String,
annotations: HashMap<String, Value>,
from_entity: String,
to_entity: String,
quantity: Option<i32>,
},
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: String,
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>,
},
}Expand description
AST Node types representing all SEA DSL declarations
Variants§
Export
Export wrapper for public declarations
Fields
§
declaration: Box<SpannedAstNode>Entity
Entity declaration
Fields
Resource
Resource declaration
Fields
Flow
Flow declaration - resource transfer between entities
Fields
Pattern
Pattern declaration - named regex for string validation
Role
Role declaration - participant category
Relation
Relation declaration - predicate connecting roles
Fields
Dimension
Dimension declaration for units
UnitDeclaration
Unit declaration - custom unit definition
Fields
Policy
Policy declaration - validation rule or constraint
Instance
Instance declaration - entity instance with field values
ConceptChange
ConceptChange declaration - version migration
Fields
Metric
Metric declaration - observable metric
MappingDecl
Mapping declaration - format mapping rules
ProjectionDecl
Projection declaration - output configuration
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AstNode
impl<'de> Deserialize<'de> for AstNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AstNode
impl RefUnwindSafe for AstNode
impl Send for AstNode
impl Sync for AstNode
impl Unpin 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