pub trait TraceableSimulation: Simulation {
// Required methods
fn add_tracer<T>(&mut self, tracer: Rc<T>)
where T: SimulationTracer<Place = Self::Place, Transition = Self::Transition, Arc = Self::Arc, Net = Self::Net, Tokens = Self::Tokens, Marking = Self::Marking, Simulation = Self> + 'static;
fn remove_tracer(&mut self);
}Expand description
This trait provides for a simulation to add and remove a single tracer implementation.
Note that if you add a tracer after a simulation has started there is no expectation that missed events will be delivered.
Required Methods§
Sourcefn add_tracer<T>(&mut self, tracer: Rc<T>)where
T: SimulationTracer<Place = Self::Place, Transition = Self::Transition, Arc = Self::Arc, Net = Self::Net, Tokens = Self::Tokens, Marking = Self::Marking, Simulation = Self> + 'static,
fn add_tracer<T>(&mut self, tracer: Rc<T>)where
T: SimulationTracer<Place = Self::Place, Transition = Self::Transition, Arc = Self::Arc, Net = Self::Net, Tokens = Self::Tokens, Marking = Self::Marking, Simulation = Self> + 'static,
Add a tracer to this simulation.
Sourcefn remove_tracer(&mut self)
fn remove_tracer(&mut self)
Remove any tracer associated with this simulation. If no tracer is associated this method does nothing.
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.