pub trait ToRecursiveError {
// Required method
fn construct_recursive(self, context: &'static str) -> RecursiveError;
}Expand description
Like Into, but different, because we don’t actually want to implement Into for our subordinate error types.
By forcing ourselves to map errors everywhere in order for question mark operators to work, we ensure that we can take the opportunity to include a little bit of manual context. Pervasively done, this means that our errors have quite a lot of contextual information about the call stack and what precisely has gone wrong.
Required Methods§
Sourcefn construct_recursive(self, context: &'static str) -> RecursiveError
fn construct_recursive(self, context: &'static str) -> RecursiveError
Construct a recursive error given the current context