pub struct Payload(/* private fields */);Expand description
Unwinding payload wrapped to abort by default if it panics on drop
Implementations§
Source§impl Payload
impl Payload
Sourcepub fn get_mut(&mut self) -> &mut (dyn Any + Send + 'static)
pub fn get_mut(&mut self) -> &mut (dyn Any + Send + 'static)
Get a mutable reference to the payload
Sourcepub fn into_inner(self) -> Box<dyn Any + Send + 'static>
pub fn into_inner(self) -> Box<dyn Any + Send + 'static>
Get the payload itself. This may panic when dropped
Sourcepub fn drop_or_abort(self)
pub fn drop_or_abort(self)
Drop the payload and abort the process if doing so panics
Sourcepub fn drop_or_forget(self)
pub fn drop_or_forget(self)
Drop the payload. If doing so panics, mem::forget the new payload
Sourcepub fn resume_unwind(self)
pub fn resume_unwind(self)
Resume unwinding with this payload
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Payload
impl !RefUnwindSafe for Payload
impl Send for Payload
impl !Sync for Payload
impl Unpin for Payload
impl !UnwindSafe for Payload
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