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§
Auto Trait Implementations§
impl !RefUnwindSafe for PanicHandler
impl !UnwindSafe for PanicHandler
impl Forget for PanicHandler
impl Freeze for PanicHandler
impl Move for PanicHandler
impl Send for PanicHandler
impl Sync for PanicHandler
impl Unpin for PanicHandler
impl UnsafeUnpin for PanicHandlerwhere
*const ArcInner<Mutex<PanicHandlerInner>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<PanicHandlerInner>>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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