cranenum 0.0.1

CranEnum is a crate that makes it possible to convert the type set as a value in an enum to its parent enum
Documentation
use cranenum::Propagationalize;

#[derive(Propagationalize)]
// #[self_name(lowercase)]
enum RootError {
  CustomError(CustomError),
}

enum CustomError {
  MyError1(String),
  MyError2(String),
}

#[test]
fn test_can_convert() {
    let my_error1 = CustomError::MyError1("hoge".to_string());
    let _to: RootError = RootError::from(my_error1);

    let my_error2 = CustomError::MyError2("fuga".to_string());
    let _to: RootError = RootError::from(my_error2);
}