Trait fatality::Split

source ·
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§

source

type Jfyi: Error + Send + Sync + 'static

source

type Fatal: Error + Send + Sync + 'static

Required Methods§

source

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 forwarded finality evaluations, or it must be splitable up the point where no more forward annotations were used.

Implementors§