[][src]Trait gf::mc::trace::TraceCursor

pub trait TraceCursor<'a>: TraceStep<'a> {
    fn pos(&self) -> Option<u64>;
fn set_pos(&mut self, pos: Option<u64>); }

A cursor for navigating a trace.

The cursor is either at some trace position, or is in the “nowhere” state. In the former case, there is a sequence of [TraceEvent]s that happened at this position.

Cursors are extensions of TraceSteps that allow random trace access.

Required methods

fn pos(&self) -> Option<u64>

Return the current trace position.

fn set_pos(&mut self, pos: Option<u64>)

Set the current trace position.

If the position is outside the valid range, the cursor is reset into the “nowhere” state.

Loading content...


Loading content...