Struct eframe::web::PanicHandler
source · pub struct PanicHandler(/* private fields */);
Expand description
Detects panics, logs them using console.error
, and stores the panics message and callstack.
This lets you query PanicHandler
for the panic message (if any) so you can show it in the HTML.
Chep to clone (ref-counted).
Implementations§
source§impl PanicHandler
impl PanicHandler
sourcepub fn has_panicked(&self) -> bool
pub fn has_panicked(&self) -> bool
Has there been a panic?
sourcepub fn panic_summary(&self) -> Option<PanicSummary>
pub fn panic_summary(&self) -> Option<PanicSummary>
What was the panic message and callstack?
Trait Implementations§
source§impl Clone for PanicHandler
impl Clone for PanicHandler
source§fn clone(&self) -> PanicHandler
fn clone(&self) -> PanicHandler
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for PanicHandler
impl !RefUnwindSafe for PanicHandler
impl Send for PanicHandler
impl Sync for PanicHandler
impl Unpin for PanicHandler
impl !UnwindSafe for PanicHandler
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
Mutably borrows from an owned value. Read more