pub struct EventReplayer { /* private fields */ }Expand description
确定性时间旅行事件回放器。
Implementations§
Source§impl EventReplayer
impl EventReplayer
pub fn from_vlxrec_text(text: &str) -> Result<Self, &'static str>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn cursor(&self) -> usize
Sourcepub fn step_next(&mut self, engine: &mut VeloxEngine) -> Option<bool>
pub fn step_next(&mut self, engine: &mut VeloxEngine) -> Option<bool>
逐帧推进回放 1 步,返回 Some(checksum_matched);结束时返回 None。
Sourcepub fn replay_all(&mut self, engine: &mut VeloxEngine) -> ReplayReport
pub fn replay_all(&mut self, engine: &mut VeloxEngine) -> ReplayReport
一次性回放全部剩余步骤并返回确定性验证报告。
Trait Implementations§
Source§impl Clone for EventReplayer
impl Clone for EventReplayer
Auto Trait Implementations§
impl Forget for EventReplayer
impl Freeze for EventReplayer
impl Move for EventReplayer
impl RefUnwindSafe for EventReplayer
impl Send for EventReplayer
impl Sync for EventReplayer
impl Unpin for EventReplayer
impl UnsafeUnpin for EventReplayer
impl UnwindSafe for EventReplayer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。