NonStreamingTraceWriter

Struct NonStreamingTraceWriter 

Source
pub struct NonStreamingTraceWriter {
    pub events: Vec<TraceLowLevelEvent>,
    /* private fields */
}
Expand description

State machine used to record TraceLowLevelEvents.

A NonStreamingTraceWriter instance accumulates events in memory and stores them on disk when the finish_writing_trace_* methods are called. The in-memory event list is exposed publicly.

Fields§

§events: Vec<TraceLowLevelEvent>

Implementations§

Source§

impl NonStreamingTraceWriter

Source

pub fn new(program: &str, args: &[String]) -> Self

Create a new tracer instance for the given program and arguments.

Source

pub fn set_format(&mut self, format: TraceEventsFileFormat)

Trait Implementations§

Source§

impl TraceWriter for NonStreamingTraceWriter

Source§

fn begin_writing_trace_events( &mut self, path: &Path, ) -> Result<(), Box<dyn Error>>

Source§

fn finish_writing_trace_events(&mut self) -> Result<(), Box<dyn Error>>

Source§

fn begin_writing_trace_metadata( &mut self, path: &Path, ) -> Result<(), Box<dyn Error>>

Source§

fn begin_writing_trace_paths( &mut self, path: &Path, ) -> Result<(), Box<dyn Error>>

Source§

fn start(&mut self, path: &Path, line: Line)

Source§

fn ensure_path_id(&mut self, path: &Path) -> PathId

Source§

fn ensure_function_id( &mut self, function_name: &str, path: &Path, line: Line, ) -> FunctionId

Source§

fn ensure_type_id(&mut self, kind: TypeKind, lang_type: &str) -> TypeId

Source§

fn ensure_raw_type_id(&mut self, typ: TypeRecord) -> TypeId

Source§

fn ensure_variable_id(&mut self, variable_name: &str) -> VariableId

Source§

fn register_path(&mut self, path: &Path)

Source§

fn register_function(&mut self, name: &str, path: &Path, line: Line)

Source§

fn register_step(&mut self, path: &Path, line: Line)

Source§

fn register_call(&mut self, function_id: FunctionId, args: Vec<FullValueRecord>)

Source§

fn arg(&mut self, name: &str, value: ValueRecord) -> FullValueRecord

Source§

fn register_return(&mut self, return_value: ValueRecord)

Source§

fn register_special_event(&mut self, kind: EventLogKind, content: &str)

Source§

fn to_raw_type(&self, kind: TypeKind, lang_type: &str) -> TypeRecord

Source§

fn register_type(&mut self, kind: TypeKind, lang_type: &str)

Source§

fn register_raw_type(&mut self, typ: TypeRecord)

Source§

fn register_asm(&mut self, instructions: &[String])

Source§

fn register_variable_with_full_value(&mut self, name: &str, value: ValueRecord)

Source§

fn register_variable_name(&mut self, variable_name: &str)

Source§

fn register_full_value(&mut self, variable_id: VariableId, value: ValueRecord)

Source§

fn register_compound_value(&mut self, place: Place, value: ValueRecord)

Source§

fn register_cell_value(&mut self, place: Place, value: ValueRecord)

Source§

fn assign_compound_item( &mut self, place: Place, index: usize, item_place: Place, )

Source§

fn assign_cell(&mut self, place: Place, new_value: ValueRecord)

Source§

fn register_variable(&mut self, variable_name: &str, place: Place)

Source§

fn drop_variable(&mut self, variable_name: &str)

Source§

fn assign(&mut self, variable_name: &str, rvalue: RValue, pass_by: PassBy)

Source§

fn bind_variable(&mut self, variable_name: &str, place: Place)

Source§

fn drop_variables(&mut self, variable_names: &[String])

Source§

fn simple_rvalue(&mut self, variable_name: &str) -> RValue

Source§

fn compound_rvalue(&mut self, variable_dependencies: &[String]) -> RValue

Source§

fn drop_last_step(&mut self)

Source§

fn add_event(&mut self, event: TraceLowLevelEvent)

Source§

fn append_events(&mut self, events: &mut Vec<TraceLowLevelEvent>)

Source§

fn finish_writing_trace_metadata(&mut self) -> Result<(), Box<dyn Error>>

Source§

fn finish_writing_trace_paths(&mut self) -> Result<(), Box<dyn Error>>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.