Enum Execution

Source
pub enum Execution {
    Normal,
    Recording {
        events: Vec<TimedEvent>,
        start: Instant,
        path: PathBuf,
        digest: DigestState,
        recorder: FrameRecorder,
    },
    Replaying {
        events: VecDeque<TimedEvent>,
        start: Instant,
        path: PathBuf,
        digest: DigestState,
        result: ReplayResult,
        recorder: FrameRecorder,
    },
}
Expand description

Execution mode. Controls whether the session is playing or recording commands.

Variants§

§

Normal

Normal execution. User inputs are processed normally.

§

Recording

Recording user inputs to log.

Fields

§events: Vec<TimedEvent>

Events being recorded.

§start: Instant

Start time of recording.

§path: PathBuf

Path to save recording to.

§digest: DigestState

Digest mode.

§recorder: FrameRecorder

Frame recorder.

§

Replaying

Replaying inputs from log.

Fields

§events: VecDeque<TimedEvent>

Events being replayed.

§start: Instant

Start time of the playback.

§path: PathBuf

Path to read events from.

§digest: DigestState

Digest mode.

§result: ReplayResult

Replay result.

§recorder: FrameRecorder

Frame recorder.

Implementations§

Source§

impl Execution

Source

pub fn normal() -> Result<Self>

Create a normal execution.

Source

pub fn recording<P: AsRef<Path>>( path: P, digest_mode: DigestMode, w: u16, h: u16, gif_mode: GifMode, ) -> Result<Self>

Create a recording.

Source

pub fn replaying<P: AsRef<Path>>(path: P, mode: DigestMode) -> Result<Self>

Create a replay.

Source

pub fn is_normal(&self) -> bool

Source

pub fn record(&mut self, data: &[Bgra8])

Source

pub fn stop_recording(&mut self) -> Result<PathBuf>

Source

pub fn finalize_replaying(&self) -> Result<PathBuf>

Trait Implementations§

Source§

impl Default for Execution

Source§

fn default() -> Self

Returns the “default value” for a type. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SetParameter for T

Source§

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result
where T: Parameter<Self>,

Sets value as a parameter of self.
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.