pub struct TimeTravelDebugger {
pub config: TimeTravelConfig,
/* private fields */
}Expand description
Time-travel debugger
Fields§
§config: TimeTravelConfigConfiguration
Implementations§
Source§impl TimeTravelDebugger
impl TimeTravelDebugger
Sourcepub fn with_config(self, config: TimeTravelConfig) -> Self
pub fn with_config(self, config: TimeTravelConfig) -> Self
Set configuration
Sourcepub fn max_snapshots(self, max: usize) -> Self
pub fn max_snapshots(self, max: usize) -> Self
Set max snapshots
Sourcepub fn record(&mut self, snapshot: StateSnapshot)
pub fn record(&mut self, snapshot: StateSnapshot)
Record a new snapshot
Sourcepub fn record_action(
&mut self,
action: Action,
state: HashMap<String, SnapshotValue>,
)
pub fn record_action( &mut self, action: Action, state: HashMap<String, SnapshotValue>, )
Record state with action
Sourcepub fn toggle_recording(&mut self)
pub fn toggle_recording(&mut self)
Toggle recording
Sourcepub fn current(&self) -> Option<&StateSnapshot>
pub fn current(&self) -> Option<&StateSnapshot>
Get current snapshot
Sourcepub fn get(&self, index: usize) -> Option<&StateSnapshot>
pub fn get(&self, index: usize) -> Option<&StateSnapshot>
Get snapshot at index
Sourcepub fn snapshots(&self) -> &[StateSnapshot]
pub fn snapshots(&self) -> &[StateSnapshot]
Get all snapshots
Sourcepub fn step_forward(&mut self)
pub fn step_forward(&mut self)
Step forward one snapshot
Sourcepub fn jump_to_latest(&mut self)
pub fn jump_to_latest(&mut self)
Jump to latest snapshot
Sourcepub fn jump_to_first(&mut self)
pub fn jump_to_first(&mut self)
Jump to first snapshot
Sourcepub fn is_traveling(&self) -> bool
pub fn is_traveling(&self) -> bool
Is currently traveling in history
Sourcepub fn current_diff(&self) -> Option<StateDiff>
pub fn current_diff(&self) -> Option<StateDiff>
Get diff between current and previous snapshot
Sourcepub fn diff_between(&self, from: usize, to: usize) -> Option<StateDiff>
pub fn diff_between(&self, from: usize, to: usize) -> Option<StateDiff>
Get diff between two positions
Sourcepub fn import(&mut self, snapshots: Vec<StateSnapshot>)
pub fn import(&mut self, snapshots: Vec<StateSnapshot>)
Import session from exported data
Sourcepub fn set_view(&mut self, view: TimeTravelView)
pub fn set_view(&mut self, view: TimeTravelView)
Set view mode
Sourcepub fn view(&self) -> TimeTravelView
pub fn view(&self) -> TimeTravelView
Get current view
Sourcepub fn select_next(&mut self)
pub fn select_next(&mut self)
Select next item
Sourcepub fn select_prev(&mut self)
pub fn select_prev(&mut self)
Select previous item
Sourcepub fn render_content(
&self,
buffer: &mut Buffer,
area: Rect,
config: &DevToolsConfig,
)
pub fn render_content( &self, buffer: &mut Buffer, area: Rect, config: &DevToolsConfig, )
Render time travel debugger content
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimeTravelDebugger
impl RefUnwindSafe for TimeTravelDebugger
impl Send for TimeTravelDebugger
impl Sync for TimeTravelDebugger
impl Unpin for TimeTravelDebugger
impl UnsafeUnpin for TimeTravelDebugger
impl UnwindSafe for TimeTravelDebugger
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