pub struct Playback { /* private fields */ }Expand description
A record playing, one frame at a time: on an App made from the game’s
Start (prepare), on a platform from
HeadlessPlatform::from_session. It needs no Harness, so a running
build can replay a record too.
Implementations§
Source§impl Playback
impl Playback
Sourcepub fn new(record: &SessionRecord) -> Self
pub fn new(record: &SessionRecord) -> Self
The playback of record, from its first frame.
Sourcepub fn next<G: GameData>(
&mut self,
app: &mut App<G>,
platform: &mut HeadlessPlatform,
) -> Option<Result<u32, FrameDifference>>
pub fn next<G: GameData>( &mut self, app: &mut App<G>, platform: &mut HeadlessPlatform, ) -> Option<Result<u32, FrameDifference>>
Plays the next frame at its recorded time, and answers its number,
or how its hash differs; a frame with no hash has the last one
written. None once the record is played: from its last frame on,
platform’s music and keyboard are its own again.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Playback
impl RefUnwindSafe for Playback
impl Send for Playback
impl Sync for Playback
impl Unpin for Playback
impl UnsafeUnpin for Playback
impl UnwindSafe for Playback
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