pub trait VisitBodyMut: Visitor + Sized {
Show 49 methods
// Provided methods
fn visit<'a, T: BodyVisitable>(
&'a mut self,
x: &mut T,
) -> ControlFlow<Self::Break> { ... }
fn visit_by_val<T: BodyVisitable>(
self,
x: &mut T,
) -> ControlFlow<Self::Break, Self> { ... }
fn visit_by_val_infallible<T: BodyVisitable>(self, x: &mut T) -> Self
where Self: Visitor<Break = Infallible> + Sized { ... }
fn visit_inner<T>(&mut self, x: &mut T) -> ControlFlow<Self::Break>
where T: BodyVisitable + for<'s> DriveMut<'s, BodyVisitableWrapper<Self>> { ... }
fn visit_aggregate_kind(
&mut self,
x: &mut AggregateKind,
) -> ControlFlow<Self::Break> { ... }
fn enter_aggregate_kind(&mut self, x: &mut AggregateKind) { ... }
fn exit_aggregate_kind(&mut self, x: &mut AggregateKind) { ... }
fn visit_call(&mut self, x: &mut Call) -> ControlFlow<Self::Break> { ... }
fn enter_call(&mut self, x: &mut Call) { ... }
fn exit_call(&mut self, x: &mut Call) { ... }
fn visit_fn_operand(
&mut self,
x: &mut FnOperand,
) -> ControlFlow<Self::Break> { ... }
fn enter_fn_operand(&mut self, x: &mut FnOperand) { ... }
fn exit_fn_operand(&mut self, x: &mut FnOperand) { ... }
fn visit_fn_ptr(&mut self, x: &mut FnPtr) -> ControlFlow<Self::Break> { ... }
fn enter_fn_ptr(&mut self, x: &mut FnPtr) { ... }
fn exit_fn_ptr(&mut self, x: &mut FnPtr) { ... }
fn visit_operand(&mut self, x: &mut Operand) -> ControlFlow<Self::Break> { ... }
fn enter_operand(&mut self, x: &mut Operand) { ... }
fn exit_operand(&mut self, x: &mut Operand) { ... }
fn visit_place(&mut self, x: &mut Place) -> ControlFlow<Self::Break> { ... }
fn enter_place(&mut self, x: &mut Place) { ... }
fn exit_place(&mut self, x: &mut Place) { ... }
fn visit_projection_elem(
&mut self,
x: &mut ProjectionElem,
) -> ControlFlow<Self::Break> { ... }
fn enter_projection_elem(&mut self, x: &mut ProjectionElem) { ... }
fn exit_projection_elem(&mut self, x: &mut ProjectionElem) { ... }
fn visit_rvalue(&mut self, x: &mut Rvalue) -> ControlFlow<Self::Break> { ... }
fn enter_rvalue(&mut self, x: &mut Rvalue) { ... }
fn exit_rvalue(&mut self, x: &mut Rvalue) { ... }
fn visit_locals(&mut self, x: &mut Locals) -> ControlFlow<Self::Break> { ... }
fn enter_locals(&mut self, x: &mut Locals) { ... }
fn exit_locals(&mut self, x: &mut Locals) { ... }
fn visit_local_id(&mut self, x: &mut LocalId) -> ControlFlow<Self::Break> { ... }
fn enter_local_id(&mut self, x: &mut LocalId) { ... }
fn exit_local_id(&mut self, x: &mut LocalId) { ... }
fn visit_llbc_block(&mut self, x: &mut Block) -> ControlFlow<Self::Break> { ... }
fn enter_llbc_block(&mut self, x: &mut Block) { ... }
fn exit_llbc_block(&mut self, x: &mut Block) { ... }
fn visit_llbc_statement(
&mut self,
x: &mut Statement,
) -> ControlFlow<Self::Break> { ... }
fn enter_llbc_statement(&mut self, x: &mut Statement) { ... }
fn exit_llbc_statement(&mut self, x: &mut Statement) { ... }
fn visit_ullbc_statement(
&mut self,
x: &mut Statement,
) -> ControlFlow<Self::Break> { ... }
fn enter_ullbc_statement(&mut self, x: &mut Statement) { ... }
fn exit_ullbc_statement(&mut self, x: &mut Statement) { ... }
fn visit_ullbc_terminator(
&mut self,
x: &mut Terminator,
) -> ControlFlow<Self::Break> { ... }
fn enter_ullbc_terminator(&mut self, x: &mut Terminator) { ... }
fn exit_ullbc_terminator(&mut self, x: &mut Terminator) { ... }
fn visit_ullbc_block_id(
&mut self,
x: &mut BlockId,
) -> ControlFlow<Self::Break> { ... }
fn enter_ullbc_block_id(&mut self, x: &mut BlockId) { ... }
fn exit_ullbc_block_id(&mut self, x: &mut BlockId) { ... }
}Provided Methods§
Sourcefn visit<'a, T: BodyVisitable>(
&'a mut self,
x: &mut T,
) -> ControlFlow<Self::Break>
fn visit<'a, T: BodyVisitable>( &'a mut self, x: &mut 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: &mut T,
) -> ControlFlow<Self::Break, Self>
fn visit_by_val<T: BodyVisitable>( self, x: &mut T, ) -> ControlFlow<Self::Break, Self>
Convenience alias for method chaining.
Sourcefn visit_by_val_infallible<T: BodyVisitable>(self, x: &mut T) -> Self
fn visit_by_val_infallible<T: BodyVisitable>(self, x: &mut T) -> Self
Convenience when the visitor does not return early.
Sourcefn visit_inner<T>(&mut self, x: &mut T) -> ControlFlow<Self::Break>where
T: BodyVisitable + for<'s> DriveMut<'s, BodyVisitableWrapper<Self>>,
fn visit_inner<T>(&mut self, x: &mut T) -> ControlFlow<Self::Break>where
T: BodyVisitable + for<'s> DriveMut<'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: &mut AggregateKind,
) -> ControlFlow<Self::Break>
fn visit_aggregate_kind( &mut self, x: &mut 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: &mut AggregateKind)
fn enter_aggregate_kind(&mut self, x: &mut AggregateKind)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_aggregate_kind(&mut self, x: &mut AggregateKind)
fn exit_aggregate_kind(&mut self, x: &mut AggregateKind)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_call(&mut self, x: &mut Call) -> ControlFlow<Self::Break>
fn visit_call(&mut self, x: &mut 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: &mut Call)
fn enter_call(&mut self, x: &mut Call)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_call(&mut self, x: &mut Call)
fn exit_call(&mut self, x: &mut Call)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_fn_operand(&mut self, x: &mut FnOperand) -> ControlFlow<Self::Break>
fn visit_fn_operand(&mut self, x: &mut 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: &mut FnOperand)
fn enter_fn_operand(&mut self, x: &mut FnOperand)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_fn_operand(&mut self, x: &mut FnOperand)
fn exit_fn_operand(&mut self, x: &mut FnOperand)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_fn_ptr(&mut self, x: &mut FnPtr) -> ControlFlow<Self::Break>
fn visit_fn_ptr(&mut self, x: &mut 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: &mut FnPtr)
fn enter_fn_ptr(&mut self, x: &mut FnPtr)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_fn_ptr(&mut self, x: &mut FnPtr)
fn exit_fn_ptr(&mut self, x: &mut FnPtr)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_operand(&mut self, x: &mut Operand) -> ControlFlow<Self::Break>
fn visit_operand(&mut self, x: &mut 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: &mut Operand)
fn enter_operand(&mut self, x: &mut Operand)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_operand(&mut self, x: &mut Operand)
fn exit_operand(&mut self, x: &mut Operand)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_place(&mut self, x: &mut Place) -> ControlFlow<Self::Break>
fn visit_place(&mut self, x: &mut 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: &mut Place)
fn enter_place(&mut self, x: &mut Place)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_place(&mut self, x: &mut Place)
fn exit_place(&mut self, x: &mut Place)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_projection_elem(
&mut self,
x: &mut ProjectionElem,
) -> ControlFlow<Self::Break>
fn visit_projection_elem( &mut self, x: &mut 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: &mut ProjectionElem)
fn enter_projection_elem(&mut self, x: &mut ProjectionElem)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_projection_elem(&mut self, x: &mut ProjectionElem)
fn exit_projection_elem(&mut self, x: &mut ProjectionElem)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_rvalue(&mut self, x: &mut Rvalue) -> ControlFlow<Self::Break>
fn visit_rvalue(&mut self, x: &mut 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: &mut Rvalue)
fn enter_rvalue(&mut self, x: &mut Rvalue)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_rvalue(&mut self, x: &mut Rvalue)
fn exit_rvalue(&mut self, x: &mut Rvalue)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_locals(&mut self, x: &mut Locals) -> ControlFlow<Self::Break>
fn visit_locals(&mut self, x: &mut Locals) -> 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_locals(&mut self, x: &mut Locals)
fn enter_locals(&mut self, x: &mut Locals)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_locals(&mut self, x: &mut Locals)
fn exit_locals(&mut self, x: &mut Locals)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_local_id(&mut self, x: &mut LocalId) -> ControlFlow<Self::Break>
fn visit_local_id(&mut self, x: &mut LocalId) -> 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_local_id(&mut self, x: &mut LocalId)
fn enter_local_id(&mut self, x: &mut LocalId)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_local_id(&mut self, x: &mut LocalId)
fn exit_local_id(&mut self, x: &mut LocalId)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_llbc_block(&mut self, x: &mut Block) -> ControlFlow<Self::Break>
fn visit_llbc_block(&mut self, x: &mut 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: &mut Block)
fn enter_llbc_block(&mut self, x: &mut Block)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_llbc_block(&mut self, x: &mut Block)
fn exit_llbc_block(&mut self, x: &mut Block)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_llbc_statement(
&mut self,
x: &mut Statement,
) -> ControlFlow<Self::Break>
fn visit_llbc_statement( &mut self, x: &mut 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: &mut Statement)
fn enter_llbc_statement(&mut self, x: &mut Statement)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_llbc_statement(&mut self, x: &mut Statement)
fn exit_llbc_statement(&mut self, x: &mut Statement)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_ullbc_statement(
&mut self,
x: &mut Statement,
) -> ControlFlow<Self::Break>
fn visit_ullbc_statement( &mut self, x: &mut 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: &mut Statement)
fn enter_ullbc_statement(&mut self, x: &mut Statement)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_ullbc_statement(&mut self, x: &mut Statement)
fn exit_ullbc_statement(&mut self, x: &mut Statement)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_ullbc_terminator(
&mut self,
x: &mut Terminator,
) -> ControlFlow<Self::Break>
fn visit_ullbc_terminator( &mut self, x: &mut 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: &mut Terminator)
fn enter_ullbc_terminator(&mut self, x: &mut Terminator)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_ullbc_terminator(&mut self, x: &mut Terminator)
fn exit_ullbc_terminator(&mut self, x: &mut Terminator)
Called when finished visiting a $ty (unless visit_$ty is overriden).
Sourcefn visit_ullbc_block_id(&mut self, x: &mut BlockId) -> ControlFlow<Self::Break>
fn visit_ullbc_block_id(&mut self, x: &mut 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: &mut BlockId)
fn enter_ullbc_block_id(&mut self, x: &mut BlockId)
Called when starting to visit a $ty (unless visit_$ty is overriden).
Sourcefn exit_ullbc_block_id(&mut self, x: &mut BlockId)
fn exit_ullbc_block_id(&mut self, x: &mut 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".
Implementors§
impl VisitBodyMut for IndexVisitor<'_, '_>
The visitor methods.