pub struct DefaultTracker<'a> { /* private fields */ }Expand description
Tracks Simplicity execution events and forwards them to configurable sinks.
This tracker is designed to be embedded in higher-level runners. It avoids printing or panicking on parse errors. Consumers can opt-in to receive structured debug events and jet traces via builder methods.
Implementations§
Source§impl<'a> DefaultTracker<'a>
impl<'a> DefaultTracker<'a>
Sourcepub fn new(debug_symbols: &'a DebugSymbols) -> Self
pub fn new(debug_symbols: &'a DebugSymbols) -> Self
Create a new tracker bound to the provided debug symbol table.
Sourcepub fn with_debug_sink<F>(self, sink: F) -> Self
pub fn with_debug_sink<F>(self, sink: F) -> Self
Enable forwarding of debug!() calls to the provided sink.
Sourcepub fn with_default_debug_sink(self) -> Self
pub fn with_default_debug_sink(self) -> Self
Enable the default debug!() sink that prints to stdout.
Sourcepub fn with_jet_trace_sink<F>(self, sink: F) -> Self
pub fn with_jet_trace_sink<F>(self, sink: F) -> Self
Enable forwarding of jet call traces to the provided sink.
Sourcepub fn with_default_jet_trace_sink(self) -> Self
pub fn with_default_jet_trace_sink(self) -> Self
Enable the default jet trace sink that prints to stdout.
Trait Implementations§
Source§impl<'a> ExecTracker<Elements> for DefaultTracker<'a>
impl<'a> ExecTracker<Elements> for DefaultTracker<'a>
Source§fn track_left(&mut self, _: Ihr)
fn track_left(&mut self, _: Ihr)
Track the execution of the left branch of the case node with the given
ihr.Source§fn track_right(&mut self, _: Ihr)
fn track_right(&mut self, _: Ihr)
Track the execution of the right branch of the case node with the given
ihr.Source§fn track_jet_call(
&mut self,
jet: &Elements,
input_buffer: &[UWORD],
output_buffer: &[UWORD],
_: bool,
)
fn track_jet_call( &mut self, jet: &Elements, input_buffer: &[UWORD], output_buffer: &[UWORD], _: bool, )
Track the execution of a
jet call with the given input_buffer, output_buffer, and call result success.Source§fn track_dbg_call(&mut self, cmr: &Cmr, value: Value)
fn track_dbg_call(&mut self, cmr: &Cmr, value: Value)
Track the potential execution of a
dbg! call with the given cmr and value.Source§fn is_track_debug_enabled(&self) -> bool
fn is_track_debug_enabled(&self) -> bool
Check if tracking debug calls is enabled.
Auto Trait Implementations§
impl<'a> Freeze for DefaultTracker<'a>
impl<'a> !RefUnwindSafe for DefaultTracker<'a>
impl<'a> !Send for DefaultTracker<'a>
impl<'a> !Sync for DefaultTracker<'a>
impl<'a> Unpin for DefaultTracker<'a>
impl<'a> !UnwindSafe for DefaultTracker<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more