pub struct FoldError(/* private fields */);Expand description
The error fold returns: one of the layer’s own failures, with its
code and location, or the error a callback returned, unchanged.
code is what a fixture pins: FOLD_BUDGET, FOLD_CANCEL,
FOLD_CYCLE, FOLD_DEPTH, FOLD_INHERIT or FOLD_KEY for
the layer’s own failures, and the
callback’s own code for a callback’s. The document key and the
pointers are fields; the message quotes them JSON-escaped and cut
short, since member names are document content.
TabnasError::from gives the callback’s error back as it was, and
for the layer’s own failures a new error carrying the code and the
message, so ? works inside a callback, which returns a
TabnasError: the fold recognises its own failure coming back out of
a callback and returns it with its location.
Implementations§
Source§impl FoldError
impl FoldError
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
The message, which for the layer’s own failures starts
expr fold: .
Sourcepub fn at(&self) -> Option<&str>
pub fn at(&self) -> Option<&str>
The location of the failure in that document, as an RFC 6901 pointer.
Sourcepub fn target_doc(&self) -> Option<&str>
pub fn target_doc(&self) -> Option<&str>
For a cycle, the document of the location the site named.
Sourcepub fn target(&self) -> Option<&str>
pub fn target(&self) -> Option<&str>
For a cycle, the location the site named, as an RFC 6901 pointer.
Sourcepub fn cause(&self) -> Option<&TabnasError>
pub fn cause(&self) -> Option<&TabnasError>
The error a callback (evaluate, inherit, recognise or
load) returned, when the failure was the callback’s.
Trait Implementations§
Source§impl Error for FoldError
impl Error for FoldError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()