pub enum FailureCause {
ReturnedError {
display: String,
debug: String,
prefer_debug: bool,
error: Arc<dyn Any + Send + Sync>,
},
ReturnedMessage(String),
Panic(PanicCause),
HarnessError(String),
}Variants§
ReturnedError
Test returned Err(e) where E: Display + Debug — stores both representations and the original error value for later downcasting
ReturnedMessage(String)
Test returned Err(String) — stored as raw string without formatting
Panic(PanicCause)
Test panicked
HarnessError(String)
Framework error (join failure, timeout, IPC deserialization, etc.)
Implementations§
Source§impl FailureCause
impl FailureCause
pub fn from_error<E>(e: E) -> FailureCause
pub fn render(&self) -> String
Sourcepub fn panic_message(&self) -> Option<&str>
pub fn panic_message(&self) -> Option<&str>
Get the message string for ShouldPanic matching (without backtrace)
Trait Implementations§
Source§impl Clone for FailureCause
impl Clone for FailureCause
Source§fn clone(&self) -> FailureCause
fn clone(&self) -> FailureCause
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FailureCause
impl !RefUnwindSafe for FailureCause
impl Send for FailureCause
impl Sync for FailureCause
impl Unpin for FailureCause
impl UnsafeUnpin for FailureCause
impl !UnwindSafe for FailureCause
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