pub trait Split: Error + Debug {
type Jfyi: Error + Send + Sync + 'static;
type Fatal: Error + Send + Sync + 'static;
// Required method
fn split(self) -> Result<Self::Jfyi, Self::Fatal>;
}
Expand description
Allows to split an error into two types - a fatal and a informational enum error type, that can be further consumed.
Required Associated Types§
Required Methods§
sourcefn split(self) -> Result<Self::Jfyi, Self::Fatal>
fn split(self) -> Result<Self::Jfyi, Self::Fatal>
Split the error into it’s fatal and non-fatal variants.
Ok(jfyi)
contains a enum representing all non-fatal variants, Err(fatal)
contains all fatal variants.
Attention: If the type is splitable, it must not use any forward
ed finality
evaluations, or it must be splitable up the point where no more forward
annotations
were used.