#[non_exhaustive]pub struct CrashReport {Show 14 fields
pub version: u32,
pub when: u64,
pub message: String,
pub fatal: bool,
pub location: Option<String>,
pub thread: Option<String>,
pub backtrace: String,
pub engine: String,
pub game: String,
pub target: String,
pub frame: u32,
pub top_screen: Option<String>,
pub log: Vec<String>,
pub record: Option<String>,
}Expand description
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.version: u32The version of its text: REPORT_VERSION.
when: u64When it happened: milliseconds since 1970 on the backend’s clock.
message: StringThe panic’s message, cut at MESSAGE_BYTES.
fatal: boolWhether the panic ended the game: one on the thread that runs it.
A panic on another thread (a sound library’s, with no sound device)
is kept, and never offered (offer_last_crash). A report without
the field, older than it, reads as true.
location: Option<String>Where it panicked: file:line:column.
thread: Option<String>The thread’s name, if it has one.
backtrace: StringThe backtrace as the standard library writes it, cut at
BACKTRACE_BYTES. A stripped build’s frames are <unknown>.
engine: StringThe engine’s version (ENGINE_VERSION).
game: StringThe game’s version, empty if the game gave none.
target: StringThe OS, the processor and the build: linux x86_64 release.
frame: u32The frame that was running, counted as
App::frame_number counts them.
top_screen: Option<String>The name of the screen on top, if the game was running.
log: Vec<String>The last LOG_LINES lines of the log, oldest first, each cut at
LOG_LINE_BYTES.
record: Option<String>The game’s record of its play, in the format its tools’ replay
reads (Start::crash_record).
Implementations§
Source§impl CrashReport
impl CrashReport
Sourcepub fn new(when: u64, message: impl Into<String>) -> Self
pub fn new(when: u64, message: impl Into<String>) -> Self
A report of message at when, cut at MESSAGE_BYTES, and
nothing else known yet.
Sourcepub fn limit(&mut self)
pub fn limit(&mut self)
Cuts the message, the backtrace and the log to their limits: the
last LOG_LINES lines, each at LOG_LINE_BYTES.
Sourcepub fn set_record(&mut self, record: Option<String>)
pub fn set_record(&mut self, record: Option<String>)
Sets the game’s record of its play, unless it is over
RECORD_BYTES: then the record stays None, and the log’s last
line says why.
Trait Implementations§
Source§impl Clone for CrashReport
impl Clone for CrashReport
Source§fn clone(&self) -> CrashReport
fn clone(&self) -> CrashReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more