pub struct CuDebugSession<App, P, CB, TF, S, L>where
P: CopperListTuple,
S: SectionStorage,
L: UnifiedLogWrite<S> + 'static,{ /* private fields */ }Implementations§
Source§impl<App, P, CB, TF, S, L> CuDebugSession<App, P, CB, TF, S, L>where
App: CuSimApplication<S, L>,
L: UnifiedLogWrite<S> + 'static,
S: SectionStorage,
P: CopperListTuple,
CB: for<'a> Fn(&'a CopperList<P>, RobotClock) -> Box<dyn for<'z> FnMut(App::Step<'z>) -> SimOverride + 'a>,
TF: Fn(&CopperList<P>) -> Option<CuTime> + Clone,
impl<App, P, CB, TF, S, L> CuDebugSession<App, P, CB, TF, S, L>where
App: CuSimApplication<S, L>,
L: UnifiedLogWrite<S> + 'static,
S: SectionStorage,
P: CopperListTuple,
CB: for<'a> Fn(&'a CopperList<P>, RobotClock) -> Box<dyn for<'z> FnMut(App::Step<'z>) -> SimOverride + 'a>,
TF: Fn(&CopperList<P>) -> Option<CuTime> + Clone,
Sourcepub fn from_log(
log_base: &Path,
app: App,
robot_clock: RobotClock,
clock_mock: RobotClockMock,
build_callback: CB,
time_of: TF,
) -> CuResult<Self>
pub fn from_log( log_base: &Path, app: App, robot_clock: RobotClock, clock_mock: RobotClockMock, build_callback: CB, time_of: TF, ) -> CuResult<Self>
Build a session directly from a unified log on disk (streaming index, no bulk load).
Sourcepub fn from_log_with_cache_cap(
log_base: &Path,
app: App,
robot_clock: RobotClock,
clock_mock: RobotClockMock,
build_callback: CB,
time_of: TF,
cache_cap: usize,
) -> CuResult<Self>
pub fn from_log_with_cache_cap( log_base: &Path, app: App, robot_clock: RobotClock, clock_mock: RobotClockMock, build_callback: CB, time_of: TF, cache_cap: usize, ) -> CuResult<Self>
Build a session directly from a log, with an explicit cache size.
Sourcepub fn goto_cl(&mut self, culistid: u64) -> CuResult<JumpOutcome>
pub fn goto_cl(&mut self, culistid: u64) -> CuResult<JumpOutcome>
Jump to a copperlist by id.
Sourcepub fn goto_time(&mut self, ts: CuTime) -> CuResult<JumpOutcome>
pub fn goto_time(&mut self, ts: CuTime) -> CuResult<JumpOutcome>
Jump to the first copperlist at or after a timestamp.
Sourcepub fn step(&mut self, delta: i32) -> CuResult<JumpOutcome>
pub fn step(&mut self, delta: i32) -> CuResult<JumpOutcome>
Step relative to the current cursor. Negative values rewind via keyframe.
Sourcepub fn current_cl(&mut self) -> CuResult<Option<Arc<CopperList<P>>>>
pub fn current_cl(&mut self) -> CuResult<Option<Arc<CopperList<P>>>>
Access the copperlist at the current cursor, if any (cloned).
Sourcepub fn cl_at(&mut self, idx: usize) -> CuResult<Option<Arc<CopperList<P>>>>
pub fn cl_at(&mut self, idx: usize) -> CuResult<Option<Arc<CopperList<P>>>>
Access a copperlist by absolute index in the log (cloned).
Sourcepub fn total_entries(&self) -> usize
pub fn total_entries(&self) -> usize
Total number of copperlists indexed in this session.
Sourcepub fn nearest_keyframe_culistid(&self, target_culistid: u64) -> Option<u64>
pub fn nearest_keyframe_culistid(&self, target_culistid: u64) -> Option<u64>
The nearest keyframe (<= target CL), if any.
Sourcepub fn section_cache_stats(&self) -> SectionCacheStats
pub fn section_cache_stats(&self) -> SectionCacheStats
Returns section-cache statistics for this session.
Sourcepub fn current_index(&self) -> Option<usize>
pub fn current_index(&self) -> Option<usize>
Current absolute cursor index, if initialized.
Source§impl<App, P, CB, TF, S, L> CuDebugSession<App, P, CB, TF, S, L>where
App: CuSimApplication<S, L> + ReflectTaskIntrospection,
L: UnifiedLogWrite<S> + 'static,
S: SectionStorage,
P: CopperListTuple,
CB: for<'a> Fn(&'a CopperList<P>, RobotClock) -> Box<dyn for<'z> FnMut(App::Step<'z>) -> SimOverride + 'a>,
TF: Fn(&CopperList<P>) -> Option<CuTime> + Clone,
impl<App, P, CB, TF, S, L> CuDebugSession<App, P, CB, TF, S, L>where
App: CuSimApplication<S, L> + ReflectTaskIntrospection,
L: UnifiedLogWrite<S> + 'static,
S: SectionStorage,
P: CopperListTuple,
CB: for<'a> Fn(&'a CopperList<P>, RobotClock) -> Box<dyn for<'z> FnMut(App::Step<'z>) -> SimOverride + 'a>,
TF: Fn(&CopperList<P>) -> Option<CuTime> + Clone,
Sourcepub fn reflected_task(&self, task_id: &str) -> CuResult<&dyn Reflect>
pub fn reflected_task(&self, task_id: &str) -> CuResult<&dyn Reflect>
Returns a reflected view of the current task instance by task id.
Sourcepub fn reflected_task_mut(
&mut self,
task_id: &str,
) -> CuResult<&mut dyn Reflect>
pub fn reflected_task_mut( &mut self, task_id: &str, ) -> CuResult<&mut dyn Reflect>
Mutable reflected task view by task id.
Sourcepub fn dump_reflected_task(&self, task_id: &str) -> CuResult<String>
pub fn dump_reflected_task(&self, task_id: &str) -> CuResult<String>
Dumps the reflected runtime state of one task.
Sourcepub fn dump_reflected_task_schemas(&self) -> String
pub fn dump_reflected_task_schemas(&self) -> String
Dumps reflected schemas registered by this application.
Auto Trait Implementations§
impl<App, P, CB, TF, S, L> Freeze for CuDebugSession<App, P, CB, TF, S, L>
impl<App, P, CB, TF, S, L> RefUnwindSafe for CuDebugSession<App, P, CB, TF, S, L>where
App: RefUnwindSafe,
CB: RefUnwindSafe,
TF: RefUnwindSafe,
S: RefUnwindSafe,
L: RefUnwindSafe,
P: RefUnwindSafe,
impl<App, P, CB, TF, S, L> Send for CuDebugSession<App, P, CB, TF, S, L>
impl<App, P, CB, TF, S, L> Sync for CuDebugSession<App, P, CB, TF, S, L>
impl<App, P, CB, TF, S, L> Unpin for CuDebugSession<App, P, CB, TF, S, L>
impl<App, P, CB, TF, S, L> UnsafeUnpin for CuDebugSession<App, P, CB, TF, S, L>
impl<App, P, CB, TF, S, L> UnwindSafe for CuDebugSession<App, P, CB, TF, S, L>where
App: UnwindSafe,
CB: UnwindSafe,
TF: UnwindSafe,
S: UnwindSafe,
L: UnwindSafe,
P: RefUnwindSafe,
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more