Skip to main content

TraceVisitor

Trait TraceVisitor 

Source
pub trait TraceVisitor {
Show 17 methods // Provided methods fn log(&mut self, id: Id, level: Level, message: &str) { ... } fn create_entity(&mut self, created_by: Id, id: Id, name: &str) { ... } fn create_monitor(&mut self, created_by: Id, id: Id, name: &str) { ... } fn create_lane(&mut self, created_by: Id, id: Id, name: &str) { ... } fn create_group(&mut self, created_by: Id, id: Id, name: &str) { ... } fn create_object( &mut self, created_by: Id, id: Id, size: usize, units: &str, req_type: u8, details: &str, ) { ... } fn destroy(&mut self, destroyed_by: Id, id: Id) { ... } fn connect(&mut self, connect_from: Id, connect_to: Id) { ... } fn enter(&mut self, id: Id, entered: Id) { ... } fn exit(&mut self, id: Id, exited: Id) { ... } fn value(&mut self, id: Id, value: f64) { ... } fn add_to_group(&mut self, id: Id, group_id: Id) { ... } fn remove_from_group(&mut self, id: Id, group_id: Id) { ... } fn begin_activity(&mut self, activity: Id, lane: Id, name: &str) { ... } fn end_activity(&mut self, activity: Id) { ... } fn capacity(&mut self, id: Id, capacity: Capacity) { ... } fn time(&mut self, id: Id, time_ns: f64) { ... }
}
Expand description

The TraceVisitor trait is the interface that allows a user to see all the events as a binary file is processed.

Note that the ID will be NO_ID if the user hasn’t set it.

Provided Methods§

Source

fn log(&mut self, id: Id, level: Level, message: &str)

A log event.

§Arguments
  • id - The originator of this event.
  • level - The logging level of the message.
  • message - The string to emit with this event.
Source

fn create_entity(&mut self, created_by: Id, id: Id, name: &str)

The creation of an entity.

§Arguments
  • created_by - ID of the entity causing the creation.
  • id - The originator of this event.
  • name - Name of the entity being created.
Source

fn create_monitor(&mut self, created_by: Id, id: Id, name: &str)

The creation of a monitor.

§Arguments
  • created_by - ID of the entity causing the creation.
  • id - The originator of this event.
  • name - Name of the monitor being created.
Source

fn create_lane(&mut self, created_by: Id, id: Id, name: &str)

The creation of a lane.

§Arguments
  • created_by - ID of the entity causing the creation.
  • id - The originator of this event.
  • name - Name of the lane being created.
Source

fn create_group(&mut self, created_by: Id, id: Id, name: &str)

The creation of a group.

§Arguments
  • created_by - ID of the entity causing the creation.
  • id - The originator of this event.
  • name - Name of the group being created.
Source

fn create_object( &mut self, created_by: Id, id: Id, size: usize, units: &str, req_type: u8, details: &str, )

The creation of an object.

§Arguments
  • created_by - ID of the entity causing the creation.
  • id - The originator of this event.
  • size - Size of the created object.
  • units - Units for the created object size.
  • req_type - The type of request being traced (Read, Write, etc).
  • details - Additional detail for the created object.
Source

fn destroy(&mut self, destroyed_by: Id, id: Id)

The destruction of a unique ID.

§Arguments
  • destroyed_by - ID of the entity causing the destruction.
  • id - The originator of this event.
Source

fn connect(&mut self, connect_from: Id, connect_to: Id)

One entity is connected to another.

§Arguments
  • connect_from - ID of the entity being connected from.
  • connect_to - ID of the entity being connected to.
Source

fn enter(&mut self, id: Id, entered: Id)

A ID is entered (e.g. start of a function or block).

§Arguments
  • id - The originator of this event.
  • entered - The ID of the entity entering.
Source

fn exit(&mut self, id: Id, exited: Id)

A ID is exited (e.g. end of a function or block).

§Arguments
  • id - The originator of this event.
  • exited - The ID of the entity exiting.
Source

fn value(&mut self, id: Id, value: f64)

A value has been set by the specified ID.

§Arguments
  • id - The originator of this event.
  • value - The value.
Source

fn add_to_group(&mut self, id: Id, group_id: Id)

The specified ID has been added to a group.

§Arguments
  • id - The ID added to the group.
  • group_id - The group ID.
Source

fn remove_from_group(&mut self, id: Id, group_id: Id)

The specified ID has been removed from a group.

§Arguments
  • id - The ID removed from the group.
  • group_id - The group ID.
Source

fn begin_activity(&mut self, activity: Id, lane: Id, name: &str)

A named activity has begun on the specified lane.

§Arguments
  • activity - The activity identity.
  • lane - The lane on which the activity is starting.
  • name - The activity name.
Source

fn end_activity(&mut self, activity: Id)

The specivied activity has ended.

§Arguments
  • activity - The activity identity.
Source

fn capacity(&mut self, id: Id, capacity: Capacity)

A capacity has been set for the specified ID.

§Arguments
  • id - The originator of this event.
  • capacity - The entity capacity and its units.
Source

fn time(&mut self, id: Id, time_ns: f64)

Advance simulation time.

§Arguments
  • id - The originator of this event.
  • time_ns - The new simulation time in ns.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§