Skip to main content

ReplayEngine

Struct ReplayEngine 

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

Replay engine that orchestrates command filtering, safety checks, interactive prompts, execution, error handling, and signal handling.

Implementations§

Source§

impl ReplayEngine

Source

pub fn new( session: Session, options: ReplayOptions, config: &Config, output: Output, ) -> Self

Create a new replay engine.

§Arguments
  • session - The session to replay
  • options - Replay configuration (dry-run, step, skip, etc.)
  • config - Application config (safety settings)
  • output - Output handler for styled terminal output
Source

pub fn with_abort_flag( session: Session, options: ReplayOptions, config: &Config, output: Output, abort_flag: Arc<AtomicBool>, ) -> Self

Create a new replay engine with a shared abort flag.

Use this when a global Ctrl+C handler is already installed and you want the engine to check the same flag.

§Arguments
  • session - The session to replay
  • options - Replay configuration (dry-run, step, skip, etc.)
  • config - Application config (safety settings)
  • output - Output handler for styled terminal output
  • abort_flag - Shared atomic flag set by the global Ctrl+C handler
Source

pub fn run(&mut self) -> Result<ReplaySummary>

Run the replay engine, processing all commands in the session.

Returns a ReplaySummary with execution statistics.

§Errors

Returns an error if command execution or I/O fails.

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.