#[non_exhaustive]pub struct CrashError {
pub timestamp: SystemTime,
pub code: Option<i32>,
pub signal: Option<i32>,
pub stdout: Txt,
pub stderr: Txt,
pub args: Box<[Txt]>,
pub minidump: Option<PathBuf>,
pub os: Txt,
}Expand description
Info about an app-process crash.
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.timestamp: SystemTimeCrash moment.
code: Option<i32>Process exit code.
signal: Option<i32>Unix signal that terminated the process.
stdout: TxtFull capture of the app stdout.
stderr: TxtFull capture of the app stderr.
args: Box<[Txt]>Arguments used.
minidump: Option<PathBuf>Minidump file.
os: TxtOperating system.
See std::env::consts::OS for details.
Implementations§
Source§impl CrashError
impl CrashError
Sourcepub fn is_stdout_plain(&self) -> bool
pub fn is_stdout_plain(&self) -> bool
Gets if stdout does not contain any ANSI scape sequences.
Sourcepub fn is_stderr_plain(&self) -> bool
pub fn is_stderr_plain(&self) -> bool
Gets if stderr does not contain any ANSI scape sequences.
Sourcepub fn stdout_plain(&self) -> Txt
pub fn stdout_plain(&self) -> Txt
Get stdout without any ANSI escape sequences (CSI).
Sourcepub fn stderr_plain(&self) -> Txt
pub fn stderr_plain(&self) -> Txt
Get stderr without any ANSI escape sequences (CSI).
Sourcepub fn has_panic_widget(&self) -> bool
pub fn has_panic_widget(&self) -> bool
Gets if stderr contains a crash panic that traced widget/window path.
Sourcepub fn find_panic(&self) -> Option<CrashPanic>
pub fn find_panic(&self) -> Option<CrashPanic>
Try parse stderr for the crash panic.
Only reliably works if the panic fully printed correctly and was formatted by the panic
hook installed by crash_handler or by the display print of CrashPanic.
Trait Implementations§
Source§impl Clone for CrashError
impl Clone for CrashError
Source§fn clone(&self) -> CrashError
fn clone(&self) -> CrashError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CrashError
impl Debug for CrashError
Source§impl<'de> Deserialize<'de> for CrashError
impl<'de> Deserialize<'de> for CrashError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for CrashError
Alternate mode {:#} prints plain stdout and stderr (no ANSI escape sequences).
impl Display for CrashError
Alternate mode {:#} prints plain stdout and stderr (no ANSI escape sequences).
Auto Trait Implementations§
impl Freeze for CrashError
impl RefUnwindSafe for CrashError
impl Send for CrashError
impl Sync for CrashError
impl Unpin for CrashError
impl UnwindSafe for CrashError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more