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§
Sourcefn module_start(&mut self, _thing: &Module) -> Result<bool, Error>
fn module_start(&mut self, _thing: &Module) -> Result<bool, Error>
Called to denote the start of a Module instance.
§Nested Calls
importonce for each import statementannotation_startonce for each annotation on the moduledefinition_startonce for each definition in the modulemodule_endonce, when imports, annotations, and definitions are complete
Sourcefn import_statement_start(
&mut self,
_thing: &ImportStatement,
) -> Result<bool, Error>
fn import_statement_start( &mut self, _thing: &ImportStatement, ) -> Result<bool, Error>
Sourcefn import_statement_end(
&mut self,
_thing: &ImportStatement,
) -> Result<(), Error>
fn import_statement_end( &mut self, _thing: &ImportStatement, ) -> Result<(), Error>
Sourcefn module_import(&mut self, _thing: &ModuleImport) -> Result<(), Error>
fn module_import(&mut self, _thing: &ModuleImport) -> Result<(), Error>
Sourcefn member_import(&mut self, _thing: &MemberImport) -> Result<(), Error>
fn member_import(&mut self, _thing: &MemberImport) -> Result<(), Error>
Sourcefn annotation_start(&mut self, _thing: &Annotation) -> Result<bool, Error>
fn annotation_start(&mut self, _thing: &Annotation) -> Result<bool, Error>
Called to denote the start of an Annotation instance.
§Nested
annotation_propertyinformal_constraintformal_constraintannotation_end
Sourcefn annotation_end(&mut self, _thing: &Annotation) -> Result<(), Error>
fn annotation_end(&mut self, _thing: &Annotation) -> Result<(), Error>
Sourcefn annotation_property(
&mut self,
_thing: &AnnotationProperty,
) -> Result<(), Error>
fn annotation_property( &mut self, _thing: &AnnotationProperty, ) -> Result<(), Error>
Sourcefn informal_constraint(
&mut self,
_thing: &ControlledLanguageString,
) -> Result<(), Error>
fn informal_constraint( &mut self, _thing: &ControlledLanguageString, ) -> Result<(), Error>
Sourcefn formal_constraint(&mut self, _thing: &FormalConstraint) -> Result<(), Error>
fn formal_constraint(&mut self, _thing: &FormalConstraint) -> Result<(), Error>
Sourcefn definition_start(&mut self, _thing: &Definition) -> Result<bool, Error>
fn definition_start(&mut self, _thing: &Definition) -> Result<bool, Error>
Called to denote the start of a Definition instance.
§Nested
datatype_startentity_startenum_startevent_startproperty_startrdf_startstructure_startunion_startdefinition_end
Sourcefn definition_end(&mut self, _thing: &Definition) -> Result<(), Error>
fn definition_end(&mut self, _thing: &Definition) -> Result<(), Error>
Sourcefn datatype_start(&mut self, _thing: &DatatypeDef) -> Result<bool, Error>
fn datatype_start(&mut self, _thing: &DatatypeDef) -> Result<bool, Error>
Sourcefn datatype_end(&mut self, _thing: &DatatypeDef) -> Result<(), Error>
fn datatype_end(&mut self, _thing: &DatatypeDef) -> Result<(), Error>
Sourcefn dimension_start(&mut self, _thing: &DimensionDef) -> Result<bool, Error>
fn dimension_start(&mut self, _thing: &DimensionDef) -> Result<bool, Error>
Called to denote the start of a DimensionDef instance.
§Nested
annotation_startdimension_entity_startdimension_parent_startmember_startdimension_end
Sourcefn dimension_end(&mut self, _thing: &DimensionDef) -> Result<(), Error>
fn dimension_end(&mut self, _thing: &DimensionDef) -> Result<(), Error>
Sourcefn dimension_identity_start(
&mut self,
_thing: &DimensionIdentity,
) -> Result<bool, Error>
fn dimension_identity_start( &mut self, _thing: &DimensionIdentity, ) -> Result<bool, Error>
Called to denote the start of a DimensionIdentity instance.
§Nested
identity_member_startorsource_entity_startdimension_entity_end
Sourcefn dimension_identity_end(
&mut self,
_thing: &DimensionIdentity,
) -> Result<(), Error>
fn dimension_identity_end( &mut self, _thing: &DimensionIdentity, ) -> Result<(), Error>
Sourcefn source_entity_start(&mut self, _thing: &SourceEntity) -> Result<bool, Error>
fn source_entity_start(&mut self, _thing: &SourceEntity) -> Result<bool, Error>
Sourcefn source_entity_end(&mut self, _thing: &SourceEntity) -> Result<(), Error>
fn source_entity_end(&mut self, _thing: &SourceEntity) -> Result<(), Error>
Sourcefn entity_start(&mut self, _thing: &EntityDef) -> Result<bool, Error>
fn entity_start(&mut self, _thing: &EntityDef) -> Result<bool, Error>
Called to denote the start of an EntityDef instance.
§Nested
annotation_startidentity_member_startmember_startentity_end
Sourcefn enum_start(&mut self, _thing: &EnumDef) -> Result<bool, Error>
fn enum_start(&mut self, _thing: &EnumDef) -> Result<bool, Error>
Called to denote the start of an EnumDef instance.
§Nested
annotation_startvalue_variant_startenum_end
Sourcefn event_start(&mut self, _thing: &EventDef) -> Result<bool, Error>
fn event_start(&mut self, _thing: &EventDef) -> Result<bool, Error>
Called to denote the start of an EventDef instance.
§Nested
annotation_startsource_entity_startmember_startevent_end
Sourcefn property_start(&mut self, _thing: &PropertyDef) -> Result<bool, Error>
fn property_start(&mut self, _thing: &PropertyDef) -> Result<bool, Error>
Sourcefn property_end(&mut self, _thing: &PropertyDef) -> Result<(), Error>
fn property_end(&mut self, _thing: &PropertyDef) -> Result<(), Error>
Sourcefn structure_start(&mut self, _thing: &StructureDef) -> Result<bool, Error>
fn structure_start(&mut self, _thing: &StructureDef) -> Result<bool, Error>
Called to denote the start of a StructureDef instance.
§Nested
annotation_startmember_startstructure_end
Sourcefn structure_end(&mut self, _thing: &StructureDef) -> Result<(), Error>
fn structure_end(&mut self, _thing: &StructureDef) -> Result<(), Error>
Sourcefn union_start(&mut self, _thing: &UnionDef) -> Result<bool, Error>
fn union_start(&mut self, _thing: &UnionDef) -> Result<bool, Error>
Called to denote the start of an UnionDef instance.
§Nested
annotation_starttype_variant_startunion_end
Sourcefn member_start(&mut self, _thing: &Member) -> Result<bool, Error>
fn member_start(&mut self, _thing: &Member) -> Result<bool, Error>
Called to denote the start of a Member instance.
§Nested
property_reference_startmember_definition_startmember_end
Sourcefn identity_member_start(&mut self, _thing: &Member) -> Result<bool, Error>
fn identity_member_start(&mut self, _thing: &Member) -> Result<bool, Error>
Called to denote the start of an identity Member instance.
§Nested
property_reference_startmember_definition_startidentity_member_end
Sourcefn dimension_parent_start(
&mut self,
_thing: &DimensionParent,
) -> Result<bool, Error>
fn dimension_parent_start( &mut self, _thing: &DimensionParent, ) -> Result<bool, Error>
Sourcefn dimension_parent_end(
&mut self,
_thing: &DimensionParent,
) -> Result<(), Error>
fn dimension_parent_end( &mut self, _thing: &DimensionParent, ) -> Result<(), Error>
Sourcefn property_reference_start(
&mut self,
_thing: &IdentifierReference,
) -> Result<bool, Error>
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
Sourcefn property_reference_end(
&mut self,
_thing: &IdentifierReference,
) -> Result<(), Error>
fn property_reference_end( &mut self, _thing: &IdentifierReference, ) -> Result<(), Error>
Sourcefn value_variant_start(&mut self, _thing: &ValueVariant) -> Result<bool, Error>
fn value_variant_start(&mut self, _thing: &ValueVariant) -> Result<bool, Error>
Sourcefn value_variant_end(&mut self, _thing: &ValueVariant) -> Result<(), Error>
fn value_variant_end(&mut self, _thing: &ValueVariant) -> Result<(), Error>
Sourcefn type_variant_start(&mut self, _thing: &TypeVariant) -> Result<bool, Error>
fn type_variant_start(&mut self, _thing: &TypeVariant) -> Result<bool, Error>
Sourcefn type_variant_end(&mut self, _thing: &TypeVariant) -> Result<(), Error>
fn type_variant_end(&mut self, _thing: &TypeVariant) -> Result<(), Error>
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.