Struct AppFrameReport
pub struct AppFrameReport {
pub scheduled_updates: u32,
pub executed_updates: u32,
pub dt: f32,
pub alpha: f32,
pub dropped_seconds: f64,
pub rendered: bool,
pub control: AppControl,
}Expand description
Execution and timing details for one completed host frame call.
Returned by App::frame_report and retained by App::last_frame_report,
including when a frame returns an error. Counts describe hooks that actually
ran, not successful simulation commits: a failing hook may mutate game state.
See App::frame_report for an executable example.
Fields§
§scheduled_updates: u32Number of fixed updates budgeted by the session for this frame.
The session tick includes this whole budget, even when stop/error skips some hooks. Zero if startup stops/fails or the app was already stopped.
executed_updates: u32Number of fixed-update hooks that ran, including one returning Stop or Err.
Never greater than scheduled_updates; an error does not roll back work.
dt: f32The session’s fixed timestep in seconds, even when no updates run.
alpha: f32The session’s interpolation factor in 0.0..=1.0 for this frame.
This is passed to render if it runs. It remains available when an update stops/fails before rendering, and is zero if the session is inactive or never advanced because startup stopped/failed or the app was stopped.
dropped_seconds: f64Whole-step time discarded by the clock’s catch-up budget, in seconds.
This is the session’s FrameStep::dropped_seconds unchanged. It excludes
scheduled updates skipped by stop/error, inactive-session time, invalid
elapsed time and time above the core clock’s elapsed-time cap.
rendered: boolWhether the render hook ran, including one returning Stop or Err.
This records invocation, not successful presentation by a host renderer.
control: AppControlWhether the app can accept another frame after this call.
Stop also covers errors and calls on an already stopped app. This is an application decision, independent of the session’s pause or terminal state.
Trait Implementations§
§impl Clone for AppFrameReport
impl Clone for AppFrameReport
§fn clone(&self) -> AppFrameReport
fn clone(&self) -> AppFrameReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more