cgp-error-extra 0.7.0

Context-generic programming error components
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::convert::Infallible;

use cgp_core::error::{ErrorRaiser, ErrorRaiserComponent, HasErrorType};
use cgp_core::prelude::*;

#[cgp_new_provider]
impl<Context> ErrorRaiser<Context, Infallible> for RaiseInfallible
where
    Context: HasErrorType,
{
    fn raise_error(e: Infallible) -> Context::Error {
        match e {}
    }
}