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§
Sourcefn log(&mut self, id: Id, level: Level, message: &str)
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.
Sourcefn create_entity(&mut self, created_by: Id, id: Id, name: &str)
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.
Sourcefn create_monitor(&mut self, created_by: Id, id: Id, name: &str)
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.
Sourcefn create_lane(&mut self, created_by: Id, id: Id, name: &str)
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.
Sourcefn create_group(&mut self, created_by: Id, id: Id, name: &str)
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.
Sourcefn create_object(
&mut self,
created_by: Id,
id: Id,
size: usize,
units: &str,
req_type: u8,
details: &str,
)
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.
Sourcefn destroy(&mut self, destroyed_by: Id, id: Id)
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.
Sourcefn connect(&mut self, connect_from: Id, connect_to: Id)
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.
Sourcefn enter(&mut self, id: Id, entered: Id)
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.
Sourcefn exit(&mut self, id: Id, exited: Id)
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.
Sourcefn value(&mut self, id: Id, value: f64)
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.
Sourcefn add_to_group(&mut self, id: Id, group_id: Id)
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.
Sourcefn remove_from_group(&mut self, id: Id, group_id: Id)
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.
Sourcefn begin_activity(&mut self, activity: Id, lane: Id, name: &str)
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.
Sourcefn end_activity(&mut self, activity: Id)
fn end_activity(&mut self, activity: Id)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".