Trait SimpleModuleVisitor

Source
pub trait SimpleModuleVisitor {
    const INCLUDE_NESTED: Result<bool, Error> = _;
    const NO_NESTED: Result<bool, Error> = _;
Show 49 methods // Provided methods fn module_start(&mut self, _thing: &Module) -> Result<bool, Error> { ... } fn module_end(&mut self, _thing: &Module) -> Result<(), Error> { ... } fn import_statement_start( &mut self, _thing: &ImportStatement, ) -> Result<bool, Error> { ... } fn import_statement_end( &mut self, _thing: &ImportStatement, ) -> Result<(), Error> { ... } fn module_import(&mut self, _thing: &ModuleImport) -> Result<(), Error> { ... } fn member_import(&mut self, _thing: &MemberImport) -> Result<(), Error> { ... } fn annotation_start(&mut self, _thing: &Annotation) -> Result<bool, Error> { ... } fn annotation_end(&mut self, _thing: &Annotation) -> Result<(), Error> { ... } fn annotation_property( &mut self, _thing: &AnnotationProperty, ) -> Result<(), Error> { ... } fn informal_constraint( &mut self, _thing: &ControlledLanguageString, ) -> Result<(), Error> { ... } fn formal_constraint( &mut self, _thing: &FormalConstraint, ) -> Result<(), Error> { ... } fn definition_start(&mut self, _thing: &Definition) -> Result<bool, Error> { ... } fn definition_end(&mut self, _thing: &Definition) -> Result<(), Error> { ... } fn datatype_start(&mut self, _thing: &DatatypeDef) -> Result<bool, Error> { ... } fn datatype_end(&mut self, _thing: &DatatypeDef) -> Result<(), Error> { ... } fn dimension_start(&mut self, _thing: &DimensionDef) -> Result<bool, Error> { ... } fn dimension_end(&mut self, _thing: &DimensionDef) -> Result<(), Error> { ... } fn dimension_identity_start( &mut self, _thing: &DimensionIdentity, ) -> Result<bool, Error> { ... } fn dimension_identity_end( &mut self, _thing: &DimensionIdentity, ) -> Result<(), Error> { ... } fn source_entity_start( &mut self, _thing: &SourceEntity, ) -> Result<bool, Error> { ... } fn source_entity_end(&mut self, _thing: &SourceEntity) -> Result<(), Error> { ... } fn entity_start(&mut self, _thing: &EntityDef) -> Result<bool, Error> { ... } fn entity_end(&mut self, _thing: &EntityDef) -> Result<(), Error> { ... } fn enum_start(&mut self, _thing: &EnumDef) -> Result<bool, Error> { ... } fn enum_end(&mut self, _thing: &EnumDef) -> Result<(), Error> { ... } fn event_start(&mut self, _thing: &EventDef) -> Result<bool, Error> { ... } fn event_end(&mut self, _thing: &EventDef) -> Result<(), Error> { ... } fn property_start(&mut self, _thing: &PropertyDef) -> Result<bool, Error> { ... } fn property_end(&mut self, _thing: &PropertyDef) -> Result<(), Error> { ... } fn rdf_start(&mut self, _thing: &RdfDef) -> Result<bool, Error> { ... } fn rdf_end(&mut self, _thing: &RdfDef) -> Result<(), Error> { ... } fn structure_start(&mut self, _thing: &StructureDef) -> Result<bool, Error> { ... } fn structure_end(&mut self, _thing: &StructureDef) -> Result<(), Error> { ... } fn union_start(&mut self, _thing: &UnionDef) -> Result<bool, Error> { ... } fn union_end(&mut self, _thing: &UnionDef) -> Result<(), Error> { ... } fn member_start(&mut self, _thing: &Member) -> Result<bool, Error> { ... } fn member_end(&mut self, _thing: &Member) -> Result<(), Error> { ... } fn identity_member_start(&mut self, _thing: &Member) -> Result<bool, Error> { ... } fn identity_member_end(&mut self, _thing: &Member) -> Result<(), Error> { ... } fn dimension_parent_start( &mut self, _thing: &DimensionParent, ) -> Result<bool, Error> { ... } fn dimension_parent_end( &mut self, _thing: &DimensionParent, ) -> Result<(), Error> { ... } fn member_definition_start( &mut self, _thing: &MemberDef, ) -> Result<bool, Error> { ... } fn member_definition_end(&mut self, _thing: &MemberDef) -> Result<(), Error> { ... } fn property_reference_start( &mut self, _thing: &IdentifierReference, ) -> Result<bool, Error> { ... } fn property_reference_end( &mut self, _thing: &IdentifierReference, ) -> Result<(), Error> { ... } fn value_variant_start( &mut self, _thing: &ValueVariant, ) -> Result<bool, Error> { ... } fn value_variant_end(&mut self, _thing: &ValueVariant) -> Result<(), Error> { ... } fn type_variant_start( &mut self, _thing: &TypeVariant, ) -> Result<bool, Error> { ... } fn type_variant_end(&mut self, _thing: &TypeVariant) -> Result<(), Error> { ... }
}
Expand description

The trait that captures the callbacks that walk_module_simple uses as it traverses the module.

Some functions return a boolean, this indicates whether the walker should continue into any nested structure for that model element. For example if structure_start returns false then no annotations or members within that structure instance will be walked. Note that this also removes the corresponding structure_end as well.

Provided Associated Constants§

Provided Methods§

Source

fn module_start(&mut self, _thing: &Module) -> Result<bool, Error>

Called to denote the start of a Module instance.

§Nested Calls
  • import once for each import statement
  • annotation_start once for each annotation on the module
  • definition_start once for each definition in the module
  • module_end once, when imports, annotations, and definitions are complete
Source

fn module_end(&mut self, _thing: &Module) -> Result<(), Error>

Called to denote the end of a Module instance.

§Nested

None.

Source

fn import_statement_start( &mut self, _thing: &ImportStatement, ) -> Result<bool, Error>

Called to denote the start of an ImportStatement instance.

§Nested
  • module_import
  • member_import
Source

fn import_statement_end( &mut self, _thing: &ImportStatement, ) -> Result<(), Error>

Called to denote the end of an ImportStatement instance.

§Nested

None.

Source

fn module_import(&mut self, _thing: &ModuleImport) -> Result<(), Error>

Called to handle a ModuleImport instance.

§Nested

None.

Source

fn member_import(&mut self, _thing: &MemberImport) -> Result<(), Error>

Called to handle a Qualifiedidentifier instance.

§Nested

None.

Source

fn annotation_start(&mut self, _thing: &Annotation) -> Result<bool, Error>

Called to denote the start of an Annotation instance.

§Nested
  • annotation_property
  • informal_constraint
  • formal_constraint
  • annotation_end
Source

fn annotation_end(&mut self, _thing: &Annotation) -> Result<(), Error>

Called to denote the end of an Annotation instance.

§Nested

None.

Source

fn annotation_property( &mut self, _thing: &AnnotationProperty, ) -> Result<(), Error>

Called to handle a AnnotationProperty instance.

§Nested

None.

Source

fn informal_constraint( &mut self, _thing: &ControlledLanguageString, ) -> Result<(), Error>

Called to handle a ControlledLanguageString instance.

§Nested

None.

Source

fn formal_constraint(&mut self, _thing: &FormalConstraint) -> Result<(), Error>

Called to handle a FormalConstraint instance.

§Nested

None.

Source

fn definition_start(&mut self, _thing: &Definition) -> Result<bool, Error>

Called to denote the start of a Definition instance.

§Nested
  • datatype_start
  • entity_start
  • enum_start
  • event_start
  • property_start
  • rdf_start
  • structure_start
  • union_start
  • definition_end
Source

fn definition_end(&mut self, _thing: &Definition) -> Result<(), Error>

Called to denote the end of a Definition instance.

§Nested

None

Source

fn datatype_start(&mut self, _thing: &DatatypeDef) -> Result<bool, Error>

Called to denote the start of a DatatypeDef instance.

§Nested
  • annotation_start
  • datatype_end
Source

fn datatype_end(&mut self, _thing: &DatatypeDef) -> Result<(), Error>

Called to denote the end of a DatatypeDef instance.

§Nested

None.

Source

fn dimension_start(&mut self, _thing: &DimensionDef) -> Result<bool, Error>

Called to denote the start of a DimensionDef instance.

§Nested
  • annotation_start
  • dimension_entity_start
  • dimension_parent_start
  • member_start
  • dimension_end
Source

fn dimension_end(&mut self, _thing: &DimensionDef) -> Result<(), Error>

Called to denote the end of a DimensionDef instance.

§Nested

None.

Source

fn dimension_identity_start( &mut self, _thing: &DimensionIdentity, ) -> Result<bool, Error>

Called to denote the start of a DimensionIdentity instance.

§Nested
  • identity_member_start or source_entity_start
  • dimension_entity_end
Source

fn dimension_identity_end( &mut self, _thing: &DimensionIdentity, ) -> Result<(), Error>

Called to denote the end of a DimensionIdentity instance.

§Nested

None.

Source

fn source_entity_start(&mut self, _thing: &SourceEntity) -> Result<bool, Error>

Called to denote the start of an SourceEntity instance.

§Nested
  • source_entity_end
Source

fn source_entity_end(&mut self, _thing: &SourceEntity) -> Result<(), Error>

Called to denote the end of an SourceEntity instance.

§Nested

None.

Source

fn entity_start(&mut self, _thing: &EntityDef) -> Result<bool, Error>

Called to denote the start of an EntityDef instance.

§Nested
  • annotation_start
  • identity_member_start
  • member_start
  • entity_end
Source

fn entity_end(&mut self, _thing: &EntityDef) -> Result<(), Error>

Called to denote the end of an EntityDef instance.

§Nested

None.

Source

fn enum_start(&mut self, _thing: &EnumDef) -> Result<bool, Error>

Called to denote the start of an EnumDef instance.

§Nested
  • annotation_start
  • value_variant_start
  • enum_end
Source

fn enum_end(&mut self, _thing: &EnumDef) -> Result<(), Error>

Called to denote the end of an EnumDef instance.

§Nested

None.

Source

fn event_start(&mut self, _thing: &EventDef) -> Result<bool, Error>

Called to denote the start of an EventDef instance.

§Nested
  • annotation_start
  • source_entity_start
  • member_start
  • event_end
Source

fn event_end(&mut self, _thing: &EventDef) -> Result<(), Error>

Called to denote the end of an EventDef instance.

§Nested

None.

Source

fn property_start(&mut self, _thing: &PropertyDef) -> Result<bool, Error>

Called to denote the start of a PropertyDev instance.

§Nested
  • member_definition_start
  • property_end
Source

fn property_end(&mut self, _thing: &PropertyDef) -> Result<(), Error>

Called to denote the end of a PropertyDef instance.

§Nested

None.

Source

fn rdf_start(&mut self, _thing: &RdfDef) -> Result<bool, Error>

Called to denote the start of a RdfDef instance.

§Nested
  • annotation_start
  • rdf_end
Source

fn rdf_end(&mut self, _thing: &RdfDef) -> Result<(), Error>

Called to denote the end of a RdfDef instance.

§Nested

None.

Source

fn structure_start(&mut self, _thing: &StructureDef) -> Result<bool, Error>

Called to denote the start of a StructureDef instance.

§Nested
  • annotation_start
  • member_start
  • structure_end
Source

fn structure_end(&mut self, _thing: &StructureDef) -> Result<(), Error>

Called to denote the end of a StructureDef instance.

§Nested

None.

Source

fn union_start(&mut self, _thing: &UnionDef) -> Result<bool, Error>

Called to denote the start of an UnionDef instance.

§Nested
  • annotation_start
  • type_variant_start
  • union_end
Source

fn union_end(&mut self, _thing: &UnionDef) -> Result<(), Error>

Called to denote the end of an UnionDef instance.

§Nested

None.

Source

fn member_start(&mut self, _thing: &Member) -> Result<bool, Error>

Called to denote the start of a Member instance.

§Nested
  • property_reference_start
  • member_definition_start
  • member_end
Source

fn member_end(&mut self, _thing: &Member) -> Result<(), Error>

Called to denote the end of a Member instance.

§Nested

None.

Source

fn identity_member_start(&mut self, _thing: &Member) -> Result<bool, Error>

Called to denote the start of an identity Member instance.

§Nested
  • property_reference_start
  • member_definition_start
  • identity_member_end
Source

fn identity_member_end(&mut self, _thing: &Member) -> Result<(), Error>

Called to denote the end of an identity Member instance.

§Nested

None.

Source

fn dimension_parent_start( &mut self, _thing: &DimensionParent, ) -> Result<bool, Error>

Called to denote the start of a DimensionParent instance.

§Nested
  • dimension_parent_end
Source

fn dimension_parent_end( &mut self, _thing: &DimensionParent, ) -> Result<(), Error>

Called to denote the end of a DimensionParent instance.

§Nested

None.

Source

fn member_definition_start(&mut self, _thing: &MemberDef) -> Result<bool, Error>

Called to denote the start of a MemberDef instance.

§Nested
  • annotation_start
  • member_definition_end
Source

fn member_definition_end(&mut self, _thing: &MemberDef) -> Result<(), Error>

Called to denote the end of a MemberDef instance.

§Nested

None.

Source

fn property_reference_start( &mut self, _thing: &IdentifierReference, ) -> Result<bool, Error>

Called to denote the start of a member reference IdentifierReference instance.

§Nested
  • property_reference_end
Source

fn property_reference_end( &mut self, _thing: &IdentifierReference, ) -> Result<(), Error>

Called to denote the end of a member reference IdentifierReference instance.

§Nested

None.

Source

fn value_variant_start(&mut self, _thing: &ValueVariant) -> Result<bool, Error>

Called to denote the start of a ValueVariant instance.

§Nested
  • annotation_start
  • value_variant_end
Source

fn value_variant_end(&mut self, _thing: &ValueVariant) -> Result<(), Error>

Called to denote the end of a ValueVariant instance.

§Nested

None.

Source

fn type_variant_start(&mut self, _thing: &TypeVariant) -> Result<bool, Error>

Called to denote the start of a TypeVarian instance.

§Nested
  • annotation_start
  • type_variant_end
Source

fn type_variant_end(&mut self, _thing: &TypeVariant) -> Result<(), Error>

Called to denote the end of a TypeVariant instance.

§Nested

None.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§