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.
Replaying
Replaying inputs from log.
Fields
§
digest: DigestState
Digest mode.
§
result: ReplayResult
Replay result.
§
recorder: FrameRecorder
Frame recorder.
Implementations§
Source§impl Execution
impl Execution
Sourcepub fn recording<P: AsRef<Path>>(
path: P,
digest_mode: DigestMode,
w: u16,
h: u16,
gif_mode: GifMode,
) -> Result<Self>
pub fn recording<P: AsRef<Path>>( path: P, digest_mode: DigestMode, w: u16, h: u16, gif_mode: GifMode, ) -> Result<Self>
Create a recording.
pub fn is_normal(&self) -> bool
pub fn record(&mut self, data: &[Bgra8])
pub fn stop_recording(&mut self) -> Result<PathBuf>
pub fn finalize_replaying(&self) -> Result<PathBuf>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Execution
impl RefUnwindSafe for Execution
impl Send for Execution
impl Sync for Execution
impl Unpin for Execution
impl UnwindSafe for Execution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more