pub trait SimpleModuleVisitor {
const INCLUDE_NESTED: Result<bool, Error> = _;
const NO_NESTED: Result<bool, Error> = _;
Show 41 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: &QualifiedIdentifier,
) -> 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 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 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
import
once for each import statementannotation_start
once for each annotation on the moduledefinition_start
once for each definition in the modulemodule_end
once, 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: &QualifiedIdentifier) -> Result<(), Error>
fn member_import(&mut self, _thing: &QualifiedIdentifier) -> 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_property
informal_constraint
formal_constraint
annotation_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_start
entity_start
enum_start
event_start
property_start
rdf_start
structure_start
union_start
definition_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 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_start
identity_member_start
member_start
entity_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_start
value_variant_start
enum_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_start
member_start
structure_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_start
type_variant_start
union_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_start
member_definition_start
member_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_start
member_definition_start
identity_member_end
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