TraceImpl
Fully qualified path: starkware_utils::trace::trace::TraceImpl
pub impl TraceImpl of TraceTrait;
Impl functions
latest
Retrieves the most recent checkpoint from the trace structure.
Returns
A tuple containing:
u64: Timestamp/key of the latest checkpointu128: Value stored in the latest checkpoint
Panics
If the trace structure is empty (no checkpoints exist)
Note
This will return the last inserted checkpoint that maintains the structure’s invariant of non-decreasing keys.
Fully qualified path: starkware_utils::trace::trace::TraceImpl::latest
fn latest(self: StoragePath<Trace>) -> Result<(u64, u128), TraceErrors>
penultimate
Retrieves the penultimate checkpoint from the trace structure. Penultimate checkpoint is the second last checkpoint in the trace.
Fully qualified path: starkware_utils::trace::trace::TraceImpl::penultimate
fn penultimate(self: StoragePath<Trace>) -> Result<(u64, u128), TraceErrors>
length
Returns the total number of checkpoints.
Fully qualified path: starkware_utils::trace::trace::TraceImpl::length
fn length(self: StoragePath<Trace>) -> u64
at
Returns the checkpoint at the given position.
Returns
A tuple containing:
u64: Timestamp/key of the checkpointu128: Value stored in the checkpoint
Panics
If the position is out of bounds.
Fully qualified path: starkware_utils::trace::trace::TraceImpl::at
fn at(self: StoragePath<Trace>, pos: u64) -> (u64, u128)
is_empty
Returns true is the trace is empty.
Fully qualified path: starkware_utils::trace::trace::TraceImpl::is_empty
fn is_empty(self: StoragePath<Trace>) -> bool