pub struct OnPanic<T, F: FnOnce(T)>(/* private fields */);Expand description
Runs action with the guarded state if the current scope unwinds, and nothing otherwise.
See the module documentation for what the action may do. Use on_panic when there is
no state to carry.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T, F> Freeze for OnPanic<T, F>
impl<T, F> RefUnwindSafe for OnPanic<T, F>
impl<T, F> Send for OnPanic<T, F>
impl<T, F> Sync for OnPanic<T, F>
impl<T, F> Unpin for OnPanic<T, F>
impl<T, F> UnsafeUnpin for OnPanic<T, F>
impl<T, F> UnwindSafe for OnPanic<T, F>
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