#[non_exhaustive]pub enum Payload {
ExpectedActual {
expected: String,
actual: String,
diff: Option<String>,
},
Multiple(Vec<TestError>),
Other(Box<dyn Error + Send + Sync>),
}Expand description
Structured detail attached to a TestError beyond its message.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ExpectedActual
A comparison failure carrying the expected and actual values, and an optional structural diff.
Fields
Multiple(Vec<TestError>)
Several failures collected together (soft assertions).
Other(Box<dyn Error + Send + Sync>)
An error propagated from outside test-better, preserved so its source
chain stays walkable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Payload
impl !RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnsafeUnpin for Payload
impl !UnwindSafe for Payload
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