pub trait MaybeShouldPanic {
// Required method
fn should_panic(&self) -> Option<String>;
}
Expand description
Implemented by error types that sometimes want to indicate that an error should cause a panic
even in a catch_unwind
context. Useful for implementing mz_unsafe.mz_panic('forced panic')
.
Required Methods§
Sourcefn should_panic(&self) -> Option<String>
fn should_panic(&self) -> Option<String>
Whether the error means that we want a panic. If yes, then returns the error msg.