pub enum StepError {
CellMismatch(Vec<CellDiff>),
DocStringMismatch(DocStringDiff),
ReturnShape(String),
UnexpectedPass,
Handler(HandlerError),
}Expand description
A step failure verdict — the closed union replacing the exception hierarchy.
Variants§
CellMismatch(Vec<CellDiff>)
Table / header-bound row mismatch (only the failing cells).
DocStringMismatch(DocStringDiff)
Doc-string body mismatch.
ReturnShape(String)
Wrong return type/shape — an author mistake, not a value diff.
UnexpectedPass
An error-fenced example ran without failing.
Handler(HandlerError)
An author-signalled failure (Err) or a caught panic.
Implementations§
Source§impl StepError
impl StepError
Sourcepub fn as_cell_mismatch(&self) -> Option<&[CellDiff]>
pub fn as_cell_mismatch(&self) -> Option<&[CellDiff]>
The failing cells of a StepError::CellMismatch, else None
(isCellMismatchException parity).
Sourcepub fn as_doc_string_mismatch(&self) -> Option<&DocStringDiff>
pub fn as_doc_string_mismatch(&self) -> Option<&DocStringDiff>
The diff of a StepError::DocStringMismatch, else None.
Trait Implementations§
impl StructuralPartialEq for StepError
Auto Trait Implementations§
impl Freeze for StepError
impl RefUnwindSafe for StepError
impl Send for StepError
impl Sync for StepError
impl Unpin for StepError
impl UnsafeUnpin for StepError
impl UnwindSafe for StepError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more