Struct Replay
pub struct Replay { /* private fields */ }Implementations§
§impl Replay
impl Replay
pub fn record(&mut self, frame: Frame) -> bool
pub fn frame_at(&self, tick: u64) -> Option<&Frame>
pub fn frame_at(&self, tick: u64) -> Option<&Frame>
Exact tick lookup in the original FXRP0001 input stream.
pub fn frame_before_or_at(&self, tick: u64) -> Option<&Frame>
pub fn frame_before_or_at(&self, tick: u64) -> Option<&Frame>
Most recent input at or before a tick; gaps do not invent new frames.
pub fn slice_ticks(&self, first: u64, last: u64) -> Replay
pub fn slice_ticks(&self, first: u64, last: u64) -> Replay
Export an inclusive tick range. Reversed bounds produce an empty stream.
pub fn truncate_from(&mut self, tick: u64) -> usize
pub fn truncate_from(&mut self, tick: u64) -> usize
Discard frames at or after tick, allowing a simulation to record a new branch.
pub fn first_divergence(&self, other: &Replay) -> Option<u64>
pub fn first_divergence(&self, other: &Replay) -> Option<u64>
Earliest tick with different state hashes or missing coverage. Inputs are intentionally ignored: hashes are supplied by the simulation host.
pub fn frames(&self) -> &[Frame]
pub fn encode(&self) -> Vec<u8> ⓘ
pub fn decode(data: &[u8]) -> Option<Replay>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Replay
impl RefUnwindSafe for Replay
impl Send for Replay
impl Sync for Replay
impl Unpin for Replay
impl UnwindSafe for Replay
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