pub struct CustomBody(pub Box<dyn Fn(PanicDetails<'_>) -> String + Send + Sync + 'static>);
Expand description
Replace the body with a string generated by a custom function.
NOTE: The function needs to ensure that the PanicDetails
information is escaped. This
can be done using crate::utils::escape_text
.
Tuple Fields§
§0: Box<dyn Fn(PanicDetails<'_>) -> String + Send + Sync + 'static>
Trait Implementations§
Source§impl<F> From<F> for CustomBody
impl<F> From<F> for CustomBody
Source§impl PresentationMode for CustomBody
impl PresentationMode for CustomBody
Auto Trait Implementations§
impl Freeze for CustomBody
impl !RefUnwindSafe for CustomBody
impl Send for CustomBody
impl Sync for CustomBody
impl Unpin for CustomBody
impl !UnwindSafe for CustomBody
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