pub trait WalkVisitor {
// Required methods
fn item(
&mut self,
item: &DecodedEntity,
at: &WalkCtx<'_>,
decoder: &mut EntityDecoder<'_>,
) -> Flow;
fn refused(
&mut self,
item: &DecodedEntity,
why: WalkRefusal,
ctx: &WalkCtx<'_>,
);
// Provided methods
fn shape_rep(&mut self, _rep: &DecodedEntity) -> Flow { ... }
fn enter_map(
&mut self,
_level: &MappedLevel,
_at: &WalkCtx<'_>,
_decoder: &mut EntityDecoder<'_>,
) -> Flow { ... }
fn leave_map(&mut self, _level: &MappedLevel) { ... }
}Required Methods§
Sourcefn item(
&mut self,
item: &DecodedEntity,
at: &WalkCtx<'_>,
decoder: &mut EntityDecoder<'_>,
) -> Flow
fn item( &mut self, item: &DecodedEntity, at: &WalkCtx<'_>, decoder: &mut EntityDecoder<'_>, ) -> Flow
A representation item. Under every policy but NestedMaps::Leaf it is
never an IfcMappedItem.
Sourcefn refused(&mut self, item: &DecodedEntity, why: WalkRefusal, ctx: &WalkCtx<'_>)
fn refused(&mut self, item: &DecodedEntity, why: WalkRefusal, ctx: &WalkCtx<'_>)
A refused mapped item, or the holding representation for a root-list
budget refusal. ctx.path excludes the refused level. Nested Items
failures follow enter_map and are paired with leave_map; source,
depth, cycle and level-budget failures occur before entry.
Implementors must report refusal or explicitly abstain; Ok(()) does
not certify that every item was visited.
Provided Methods§
Sourcefn shape_rep(&mut self, _rep: &DecodedEntity) -> Flow
fn shape_rep(&mut self, _rep: &DecodedEntity) -> Flow
A representation of the product, before its items.
Sourcefn enter_map(
&mut self,
_level: &MappedLevel,
_at: &WalkCtx<'_>,
_decoder: &mut EntityDecoder<'_>,
) -> Flow
fn enter_map( &mut self, _level: &MappedLevel, _at: &WalkCtx<'_>, _decoder: &mut EntityDecoder<'_>, ) -> Flow
The source and mapped representation resolved. Only Continue reads,
charges and decodes its Items, after this callback; SkipChildren and
Stop suppress those operations and their errors. The level entities
are snapshots, but child references resolve through the decoder as
mutated by this callback.
Sourcefn leave_map(&mut self, _level: &MappedLevel)
fn leave_map(&mut self, _level: &MappedLevel)
Pairs every enter_map, whatever it answered and however the level’s
items ended.