enum-error-derive

Build Status

Derive Error traits for Enum Error struct

Example

```rust

[macro_use]

extern crate enumerrorderive;

use std::{io, fmt};

[derive(Debug, EnumError)] // EnumError derives From<*>, fmt::Display and error::Error

pub enum Error { IO(io::Error), Fmt(fmt::Error), }

fn io_error() -> Result<(), io::Error> { Ok(()) }

fn fmt_error() -> Result<(), fmt::Error> { Ok(()) }

fn mergederror() -> Result<(), Error> { ioerror()?; fmt_error()?; Ok(()) } ```