pub struct PanicData { /* private fields */ }Expand description
Represents data captured from a panic.
This structure holds information about a panic that occurred during request processing, including the panic message and location if available.
Implementations§
Source§impl PanicData
Implementation of methods for PanicData.
impl PanicData
Implementation of methods for PanicData.
Sourcepub fn from_message<M>(message: M) -> Self
pub fn from_message<M>(message: M) -> Self
Sourcepub fn from_join_error(error: JoinError) -> Self
pub fn from_join_error(error: JoinError) -> Self
Sourcepub fn get_message(&self) -> &String
pub fn get_message(&self) -> &String
Sourcepub fn get_location(&self) -> Option<&String>
pub fn get_location(&self) -> Option<&String>
Gets the panic location if available.
§Returns
Option<&String>- Reference to the location string if available.
Sourcepub fn set_location<L>(&mut self, location: L)
pub fn set_location<L>(&mut self, location: L)
Trait Implementations§
Source§impl Error for PanicData
Implementation of StdError for PanicData.
impl Error for PanicData
Implementation of StdError for PanicData.
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PanicData
impl RefUnwindSafe for PanicData
impl Send for PanicData
impl Sync for PanicData
impl Unpin for PanicData
impl UnsafeUnpin for PanicData
impl UnwindSafe for PanicData
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