#[non_exhaustive]pub struct SessionRecord {
pub format_version: u32,
pub made: Option<Made>,
pub display: DisplayInfo,
pub platform: PlatformFacts,
pub storage: BTreeMap<String, String>,
pub storage_complete: bool,
pub voice_manifest: Option<String>,
pub start: u64,
pub reloaded_at: Option<u32>,
pub truncated: bool,
pub frames: Vec<FrameRecord>,
}Expand description
One run of a game, as the platform gave it (module docs). App
fills one in (App::session); from_ron reads one
back.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.format_version: u32The version of its text (FORMAT_VERSION).
made: Option<Made>The build that made it (Start::made).
display: DisplayInfoThe display the game’s load was given.
platform: PlatformFactsWhere the game ran: what the game’s load was given
(Platform::facts).
storage: BTreeMap<String, String>Every key and value in the store when it was handed over.
storage_complete: boolWhether all of the store was read: false if its keys or a value couldn’t be, or it hasn’t been handed over.
voice_manifest: Option<String>The text of the voice manifest a backend put into the game’s
Setup, which App can’t see: the backend gives it
with App::session_mut.
start: u64The time of the first frame on the backend’s clock.
reloaded_at: Option<u32>The first frame whose changed_files
named files: their new bytes aren’t in the record, so frames after it
may play differently.
truncated: boolWhether recording stopped early: at MAX_SESSION_FRAMES, or on an
App::frame_after, whose time isn’t whole milliseconds.
frames: Vec<FrameRecord>Its frames, in order.
Implementations§
Source§impl SessionRecord
impl SessionRecord
Sourcepub fn from_ron(text: &str) -> Result<Self, SessionError>
pub fn from_ron(text: &str) -> Result<Self, SessionError>
The record text holds. Another version is refused, whatever else
its text holds: a record is never migrated.
Trait Implementations§
Source§impl Clone for SessionRecord
impl Clone for SessionRecord
Source§fn clone(&self) -> SessionRecord
fn clone(&self) -> SessionRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more