Skip to main content

Tracer

Trait Tracer 

Source
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§

Source

fn init(&mut self)

Initialize new streaming.

This method needs to be called once, before calls to Self::trace.

Source

fn trace<I: IntoIterator<Item = Val>>( &mut self, action: &A, time: Time, ports: I, )

Stream a new state of the trace.

Source

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.

Implementations on Foreign Types§

Source§

impl<A> Tracer<A> for ()

Source§

fn init(&mut self)

Source§

fn trace<I: IntoIterator<Item = Val>>( &mut self, _action: &A, _time: Time, _ports: I, )

Source§

fn finalize(self, _outcome: &RunOutcome)

Implementors§