pub trait VisitBody: Visitor + Sized {
Show 43 methods
// Provided methods
fn visit<'a, T: BodyVisitable>(
&'a mut self,
x: &T,
) -> ControlFlow<Self::Break> { ... }
fn visit_by_val<T: BodyVisitable>(
self,
x: &T,
) -> ControlFlow<Self::Break, Self> { ... }
fn visit_by_val_infallible<T: BodyVisitable>(self, x: &T) -> Self
where Self: Visitor<Break = Infallible> + Sized { ... }
fn visit_inner<T>(&mut self, x: &T) -> ControlFlow<Self::Break>
where T: for<'s> Drive<'s, BodyVisitableWrapper<Self>> { ... }
fn visit_aggregate_kind(
&mut self,
x: &AggregateKind,
) -> ControlFlow<Self::Break> { ... }
fn enter_aggregate_kind(&mut self, x: &AggregateKind) { ... }
fn exit_aggregate_kind(&mut self, x: &AggregateKind) { ... }
fn visit_call(&mut self, x: &Call) -> ControlFlow<Self::Break> { ... }
fn enter_call(&mut self, x: &Call) { ... }
fn exit_call(&mut self, x: &Call) { ... }
fn visit_fn_operand(&mut self, x: &FnOperand) -> ControlFlow<Self::Break> { ... }
fn enter_fn_operand(&mut self, x: &FnOperand) { ... }
fn exit_fn_operand(&mut self, x: &FnOperand) { ... }
fn visit_fn_ptr(&mut self, x: &FnPtr) -> ControlFlow<Self::Break> { ... }
fn enter_fn_ptr(&mut self, x: &FnPtr) { ... }
fn exit_fn_ptr(&mut self, x: &FnPtr) { ... }
fn visit_operand(&mut self, x: &Operand) -> ControlFlow<Self::Break> { ... }
fn enter_operand(&mut self, x: &Operand) { ... }
fn exit_operand(&mut self, x: &Operand) { ... }
fn visit_place(&mut self, x: &Place) -> ControlFlow<Self::Break> { ... }
fn enter_place(&mut self, x: &Place) { ... }
fn exit_place(&mut self, x: &Place) { ... }
fn visit_projection_elem(
&mut self,
x: &ProjectionElem,
) -> ControlFlow<Self::Break> { ... }
fn enter_projection_elem(&mut self, x: &ProjectionElem) { ... }
fn exit_projection_elem(&mut self, x: &ProjectionElem) { ... }
fn visit_rvalue(&mut self, x: &Rvalue) -> ControlFlow<Self::Break> { ... }
fn enter_rvalue(&mut self, x: &Rvalue) { ... }
fn exit_rvalue(&mut self, x: &Rvalue) { ... }
fn visit_llbc_block(&mut self, x: &Block) -> ControlFlow<Self::Break> { ... }
fn enter_llbc_block(&mut self, x: &Block) { ... }
fn exit_llbc_block(&mut self, x: &Block) { ... }
fn visit_llbc_statement(
&mut self,
x: &Statement,
) -> ControlFlow<Self::Break> { ... }
fn enter_llbc_statement(&mut self, x: &Statement) { ... }
fn exit_llbc_statement(&mut self, x: &Statement) { ... }
fn visit_ullbc_statement(
&mut self,
x: &Statement,
) -> ControlFlow<Self::Break> { ... }
fn enter_ullbc_statement(&mut self, x: &Statement) { ... }
fn exit_ullbc_statement(&mut self, x: &Statement) { ... }
fn visit_ullbc_terminator(
&mut self,
x: &Terminator,
) -> ControlFlow<Self::Break> { ... }
fn enter_ullbc_terminator(&mut self, x: &Terminator) { ... }
fn exit_ullbc_terminator(&mut self, x: &Terminator) { ... }
fn visit_ullbc_block_id(&mut self, x: &BlockId) -> ControlFlow<Self::Break> { ... }
fn enter_ullbc_block_id(&mut self, x: &BlockId) { ... }
fn exit_ullbc_block_id(&mut self, x: &BlockId) { ... }
}
Provided Methods§
sourcefn visit<'a, T: BodyVisitable>(&'a mut self, x: &T) -> ControlFlow<Self::Break>
fn visit<'a, T: BodyVisitable>(&'a mut self, x: &T) -> ControlFlow<Self::Break>
Visit a visitable type. This calls the appropriate method of this trait on x
(visit_$ty
if it exists, visit_inner
if not).
sourcefn visit_by_val<T: BodyVisitable>(self, x: &T) -> ControlFlow<Self::Break, Self>
fn visit_by_val<T: BodyVisitable>(self, x: &T) -> ControlFlow<Self::Break, Self>
Convenience alias for method chaining.
sourcefn visit_by_val_infallible<T: BodyVisitable>(self, x: &T) -> Selfwhere
Self: Visitor<Break = Infallible> + Sized,
fn visit_by_val_infallible<T: BodyVisitable>(self, x: &T) -> Selfwhere
Self: Visitor<Break = Infallible> + Sized,
Convenience when the visitor does not return early.
sourcefn visit_inner<T>(&mut self, x: &T) -> ControlFlow<Self::Break>where
T: for<'s> Drive<'s, BodyVisitableWrapper<Self>>,
fn visit_inner<T>(&mut self, x: &T) -> ControlFlow<Self::Break>where
T: for<'s> Drive<'s, BodyVisitableWrapper<Self>>,
Visit the contents of x
. This calls self.visit()
on each field of T
. This
is available for any type whose contents are all #trait_name
.
sourcefn visit_aggregate_kind(
&mut self,
x: &AggregateKind,
) -> ControlFlow<Self::Break>
fn visit_aggregate_kind( &mut self, x: &AggregateKind, ) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_aggregate_kind(&mut self, x: &AggregateKind)
fn enter_aggregate_kind(&mut self, x: &AggregateKind)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_aggregate_kind(&mut self, x: &AggregateKind)
fn exit_aggregate_kind(&mut self, x: &AggregateKind)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_call(&mut self, x: &Call) -> ControlFlow<Self::Break>
fn visit_call(&mut self, x: &Call) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_call(&mut self, x: &Call)
fn enter_call(&mut self, x: &Call)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_call(&mut self, x: &Call)
fn exit_call(&mut self, x: &Call)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_fn_operand(&mut self, x: &FnOperand) -> ControlFlow<Self::Break>
fn visit_fn_operand(&mut self, x: &FnOperand) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_fn_operand(&mut self, x: &FnOperand)
fn enter_fn_operand(&mut self, x: &FnOperand)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_fn_operand(&mut self, x: &FnOperand)
fn exit_fn_operand(&mut self, x: &FnOperand)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_fn_ptr(&mut self, x: &FnPtr) -> ControlFlow<Self::Break>
fn visit_fn_ptr(&mut self, x: &FnPtr) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_fn_ptr(&mut self, x: &FnPtr)
fn enter_fn_ptr(&mut self, x: &FnPtr)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_fn_ptr(&mut self, x: &FnPtr)
fn exit_fn_ptr(&mut self, x: &FnPtr)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_operand(&mut self, x: &Operand) -> ControlFlow<Self::Break>
fn visit_operand(&mut self, x: &Operand) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_operand(&mut self, x: &Operand)
fn enter_operand(&mut self, x: &Operand)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_operand(&mut self, x: &Operand)
fn exit_operand(&mut self, x: &Operand)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_place(&mut self, x: &Place) -> ControlFlow<Self::Break>
fn visit_place(&mut self, x: &Place) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_place(&mut self, x: &Place)
fn enter_place(&mut self, x: &Place)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_place(&mut self, x: &Place)
fn exit_place(&mut self, x: &Place)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_projection_elem(
&mut self,
x: &ProjectionElem,
) -> ControlFlow<Self::Break>
fn visit_projection_elem( &mut self, x: &ProjectionElem, ) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_projection_elem(&mut self, x: &ProjectionElem)
fn enter_projection_elem(&mut self, x: &ProjectionElem)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_projection_elem(&mut self, x: &ProjectionElem)
fn exit_projection_elem(&mut self, x: &ProjectionElem)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_rvalue(&mut self, x: &Rvalue) -> ControlFlow<Self::Break>
fn visit_rvalue(&mut self, x: &Rvalue) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_rvalue(&mut self, x: &Rvalue)
fn enter_rvalue(&mut self, x: &Rvalue)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_rvalue(&mut self, x: &Rvalue)
fn exit_rvalue(&mut self, x: &Rvalue)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_llbc_block(&mut self, x: &Block) -> ControlFlow<Self::Break>
fn visit_llbc_block(&mut self, x: &Block) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_llbc_block(&mut self, x: &Block)
fn enter_llbc_block(&mut self, x: &Block)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_llbc_block(&mut self, x: &Block)
fn exit_llbc_block(&mut self, x: &Block)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_llbc_statement(&mut self, x: &Statement) -> ControlFlow<Self::Break>
fn visit_llbc_statement(&mut self, x: &Statement) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_llbc_statement(&mut self, x: &Statement)
fn enter_llbc_statement(&mut self, x: &Statement)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_llbc_statement(&mut self, x: &Statement)
fn exit_llbc_statement(&mut self, x: &Statement)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_ullbc_statement(&mut self, x: &Statement) -> ControlFlow<Self::Break>
fn visit_ullbc_statement(&mut self, x: &Statement) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_ullbc_statement(&mut self, x: &Statement)
fn enter_ullbc_statement(&mut self, x: &Statement)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_ullbc_statement(&mut self, x: &Statement)
fn exit_ullbc_statement(&mut self, x: &Statement)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_ullbc_terminator(&mut self, x: &Terminator) -> ControlFlow<Self::Break>
fn visit_ullbc_terminator(&mut self, x: &Terminator) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_ullbc_terminator(&mut self, x: &Terminator)
fn enter_ullbc_terminator(&mut self, x: &Terminator)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_ullbc_terminator(&mut self, x: &Terminator)
fn exit_ullbc_terminator(&mut self, x: &Terminator)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
sourcefn visit_ullbc_block_id(&mut self, x: &BlockId) -> ControlFlow<Self::Break>
fn visit_ullbc_block_id(&mut self, x: &BlockId) -> ControlFlow<Self::Break>
Overrideable method called when visiting a $ty
. When overriding this method,
call self.visit_inner(x)
to keep recursively visiting the type, or don’t call
it if the contents of x
should not be visited.
The default implementation calls enter_$ty
then visit_inner
then exit_$ty
.
sourcefn enter_ullbc_block_id(&mut self, x: &BlockId)
fn enter_ullbc_block_id(&mut self, x: &BlockId)
Called when starting to visit a $ty
(unless visit_$ty
is overriden).
sourcefn exit_ullbc_block_id(&mut self, x: &BlockId)
fn exit_ullbc_block_id(&mut self, x: &BlockId)
Called when finished visiting a $ty
(unless visit_$ty
is overriden).
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.