pub struct ExampleFailure {
pub line: i64,
pub message: String,
pub stack: String,
pub cells: Option<Vec<CellFailure>>,
pub anchor: Option<AnchorRange>,
pub doc_path: Option<String>,
}Expand description
The failure payload of a failed ExampleResult. cells is None
when not applicable. line may be a caller-supplied fallback (-1).
anchor is None when the failure carries no location for this oath —
optional for the same reason cells is, and a renderer then falls back to
line.
Fields§
§line: i64§message: String§stack: String§cells: Option<Vec<CellFailure>>§anchor: Option<AnchorRange>§doc_path: Option<String>The document line, cells and anchor are offsets INTO. None — the
overwhelming majority — means the oath itself. Set only when the failing
step was spliced in from another oath by a reference block (ADR 0016):
its spans belong to that document, and a renderer that placed them in
this one would underline whatever text sat at those offsets.
Trait Implementations§
Source§impl Clone for ExampleFailure
impl Clone for ExampleFailure
Source§fn clone(&self) -> ExampleFailure
fn clone(&self) -> ExampleFailure
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExampleFailure
impl Debug for ExampleFailure
impl Eq for ExampleFailure
Source§impl PartialEq for ExampleFailure
impl PartialEq for ExampleFailure
impl StructuralPartialEq for ExampleFailure
Auto Trait Implementations§
impl Freeze for ExampleFailure
impl RefUnwindSafe for ExampleFailure
impl Send for ExampleFailure
impl Sync for ExampleFailure
impl Unpin for ExampleFailure
impl UnsafeUnpin for ExampleFailure
impl UnwindSafe for ExampleFailure
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