Skip to main content

Replay

Struct Replay 

Source
pub struct Replay { /* private fields */ }
Expand description

A trace replayed on demand, with one working context.

Forward seeks apply only the intervening steps. A backward seek starts again from the initial context. Memory use does not grow with the number of steps visited. Like Trace::contexts, this trusts its trace; call Trace::validate first when reading an externally supplied trace.

Implementations§

Source§

impl Replay

Source

pub fn new(trace: Trace) -> Self

Takes ownership of a trace and starts at its initial context.

Source

pub fn trace(&self) -> &Trace

The trace being replayed.

Source

pub fn context_at(&mut self, step: Option<usize>) -> Option<&Context>

The context after step, or the initial context for None. Returns None for a step outside the trace, leaving the cursor unchanged.

Source

pub fn mapping_context_at( &mut self, step: usize, mapping: usize, ) -> Option<Context>

The context after one mapping of step, before its trailing engine writes. Returns None for a missing step or mapping, or malformed mapping boundaries. Only the requested mapping’s context is copied.

Trait Implementations§

Source§

impl Debug for Replay

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.