PrintTracer

Struct PrintTracer 

Source
pub struct PrintTracer<'s> { /* private fields */ }
Expand description

Tracer that collects execution trace for debugging.

Implementations§

Source§

impl<'s> PrintTracer<'s>

Source

pub fn builder<'m>( source: &'s str, module: &'m Module, ) -> PrintTracerBuilder<'s, 'm>

Create a builder for PrintTracer.

Source

pub fn print(&self)

Print all trace lines.

Trait Implementations§

Source§

impl Tracer for PrintTracer<'_>

Source§

fn trace_instruction(&mut self, ip: u16, instr: &Instruction<'_>)

Called before executing an instruction.
Source§

fn trace_nav(&mut self, nav: Nav, node: Node<'_>)

Called after navigation succeeds.
Source§

fn trace_nav_failure(&mut self, nav: Nav)

Called when navigation fails (no child/sibling exists).
Source§

fn trace_match_success(&mut self, node: Node<'_>)

Called after type check succeeds.
Source§

fn trace_match_failure(&mut self, node: Node<'_>)

Called after type check fails.
Source§

fn trace_field_success(&mut self, field_id: NonZero<u16>)

Called after field check succeeds.
Source§

fn trace_field_failure(&mut self, _node: Node<'_>)

Called after field check fails.
Source§

fn trace_effect(&mut self, effect: &RuntimeEffect<'_>)

Called after emitting an effect.
Source§

fn trace_effect_suppressed(&mut self, opcode: EffectOpcode, payload: usize)

Called when an effect is suppressed (inside @_ capture).
Source§

fn trace_suppress_control(&mut self, opcode: EffectOpcode, suppressed: bool)

Called for SuppressBegin/SuppressEnd control effects. suppressed is true if already inside another suppress scope.
Source§

fn trace_call(&mut self, target_ip: u16)

Called when entering a definition via Call.
Source§

fn trace_return(&mut self)

Called when returning from a definition.
Source§

fn trace_checkpoint_created(&mut self, ip: u16)

Called when a checkpoint is created.
Source§

fn trace_backtrack(&mut self)

Called when backtracking occurs.
Source§

fn trace_enter_entrypoint(&mut self, target_ip: u16)

Called when entering an entrypoint (for section labels).
Source§

fn trace_enter_preamble(&mut self)

Called when entering the preamble (bootstrap wrapper).

Auto Trait Implementations§

§

impl<'s> Freeze for PrintTracer<'s>

§

impl<'s> RefUnwindSafe for PrintTracer<'s>

§

impl<'s> Send for PrintTracer<'s>

§

impl<'s> Sync for PrintTracer<'s>

§

impl<'s> Unpin for PrintTracer<'s>

§

impl<'s> UnwindSafe for PrintTracer<'s>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.