pub trait Tracer<A> {
// Required methods
fn init(&mut self);
fn trace<I: IntoIterator<Item = Val>>(
&mut self,
action: &A,
time: Time,
ports: I,
);
fn finalize(self, outcome: &RunOutcome);
}Expand description
Trait that handles streaming of traces, e.g., to print them to file.
Required Methods§
Sourcefn init(&mut self)
fn init(&mut self)
Initialize new streaming.
This method needs to be called once, before calls to Self::trace.
Sourcefn trace<I: IntoIterator<Item = Val>>(
&mut self,
action: &A,
time: Time,
ports: I,
)
fn trace<I: IntoIterator<Item = Val>>( &mut self, action: &A, time: Time, ports: I, )
Stream a new state of the trace.
Sourcefn finalize(self, outcome: &RunOutcome)
fn finalize(self, outcome: &RunOutcome)
Finalize and close streaming.
This method needs to be called at the end of the execution.
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.