pub enum TestPanicResult<R> {
Cool(R),
Panic(Box<dyn Any + Send>),
}Expand description
Result of test_panic function.
Variants§
Cool(R)
No panic result. Contains callback function result.
Panic(Box<dyn Any + Send>)
Panic result. Contains panic payload.
Implementations§
Source§impl<R> TestPanicResult<R>
impl<R> TestPanicResult<R>
Sourcepub fn get_message(&self) -> Option<String>
pub fn get_message(&self) -> Option<String>
Returns panic message if exists.
Trait Implementations§
Source§impl<R: Debug> Debug for TestPanicResult<R>
impl<R: Debug> Debug for TestPanicResult<R>
Source§impl<R> PartialEq for TestPanicResult<R>where
R: PartialEq,
Compare result and error message.
impl<R> PartialEq for TestPanicResult<R>where
R: PartialEq,
Compare result and error message.
§Notes
Errors are compared by Self::get_message.
So, precise values of error payloads are not used.
impl<R> Eq for TestPanicResult<R>where
R: Eq,
Auto Trait Implementations§
impl<R> Freeze for TestPanicResult<R>where
R: Freeze,
impl<R> !RefUnwindSafe for TestPanicResult<R>
impl<R> Send for TestPanicResult<R>where
R: Send,
impl<R> !Sync for TestPanicResult<R>
impl<R> Unpin for TestPanicResult<R>where
R: Unpin,
impl<R> !UnwindSafe for TestPanicResult<R>
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