#[non_exhaustive]pub struct CrashPanic {
pub thread: Txt,
pub message: Txt,
pub file: Txt,
pub line: u32,
pub column: u32,
pub widget_path: Txt,
pub backtrace: Txt,
}Expand description
Panic parsed from a stderr dump.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.thread: TxtName of thread that panicked.
message: TxtPanic message.
file: TxtPath to file that defines the panic.
line: u32Line of code that defines the panic.
column: u32Column in the line of code that defines the panic.
widget_path: TxtWidget where the panic happened.
backtrace: TxtStack backtrace.
Implementations§
Source§impl CrashPanic
impl CrashPanic
Sourcepub fn contains(stderr: &str) -> bool
pub fn contains(stderr: &str) -> bool
Gets if stderr contains a panic that can be parsed by find.
Sourcepub fn contains_widget(stderr: &str) -> bool
pub fn contains_widget(stderr: &str) -> bool
Gets if stderr contains a panic that can be parsed by find and traced a widget/window path.
Sourcepub fn find(stderr: &str) -> Option<Self>
pub fn find(stderr: &str) -> Option<Self>
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 this type.
Sourcepub fn backtrace_frames(&self) -> impl Iterator<Item = BacktraceFrame> + '_
pub fn backtrace_frames(&self) -> impl Iterator<Item = BacktraceFrame> + '_
Iterate over frames parsed from the backtrace.
Trait Implementations§
Source§impl Clone for CrashPanic
impl Clone for CrashPanic
Source§fn clone(&self) -> CrashPanic
fn clone(&self) -> CrashPanic
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CrashPanic
impl Debug for CrashPanic
Source§impl<'de> Deserialize<'de> for CrashPanic
impl<'de> Deserialize<'de> for CrashPanic
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CrashPanic
Alternate mode {:#} prints full backtrace.
impl Display for CrashPanic
Alternate mode {:#} prints full backtrace.
Source§impl Hash for CrashPanic
impl Hash for CrashPanic
Source§impl PartialEq for CrashPanic
impl PartialEq for CrashPanic
Source§impl Serialize for CrashPanic
impl Serialize for CrashPanic
impl Eq for CrashPanic
impl StructuralPartialEq for CrashPanic
Auto Trait Implementations§
impl Freeze for CrashPanic
impl RefUnwindSafe for CrashPanic
impl Send for CrashPanic
impl Sync for CrashPanic
impl Unpin for CrashPanic
impl UnwindSafe for CrashPanic
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Clone the value.
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
Swap value with
other if both are of the same type.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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>
Converts
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>
Converts
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