pub struct PanicRecord {
pub message: Option<String>,
pub location: Option<PanicLocation>,
}Expand description
What the harness could see of a contract body’s panic.
The message comes from the payload at the catch site and the location from
the panic hook, which is the only place it exists — catch_unwind hands
back a payload and nothing else. Either half can be absent: a panic_any
of a non-string type has no message, and a panic reaching a catch site
without a matching hook record has no location.
Fields§
§message: Option<String>The panic’s message, when its payload carried one.
location: Option<PanicLocation>Where the panic happened, when the hook recorded it.
Trait Implementations§
Source§impl Clone for PanicRecord
impl Clone for PanicRecord
Source§fn clone(&self) -> PanicRecord
fn clone(&self) -> PanicRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PanicRecord
impl Debug for PanicRecord
Source§impl Default for PanicRecord
impl Default for PanicRecord
Source§fn default() -> PanicRecord
fn default() -> PanicRecord
Returns the “default value” for a type. Read more
impl Eq for PanicRecord
Source§impl From<&PanicRecord> for FaultInfo
Available on crate feature dev only.
impl From<&PanicRecord> for FaultInfo
Available on crate feature
dev only.Source§fn from(record: &PanicRecord) -> Self
fn from(record: &PanicRecord) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PanicRecord
impl PartialEq for PanicRecord
impl StructuralPartialEq for PanicRecord
Auto Trait Implementations§
impl Freeze for PanicRecord
impl RefUnwindSafe for PanicRecord
impl Send for PanicRecord
impl Sync for PanicRecord
impl Unpin for PanicRecord
impl UnsafeUnpin for PanicRecord
impl UnwindSafe for PanicRecord
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