Collection of basic proc-macros
#[macro_use]
extern crate procedurals;
struct A {}
struct B {}
#[derive(IntoEnum)] // derives From<A> and From<B> for E
enum E {
A(A),
B(B),
}
#[macro_use]
extern crate procedurals;
use std::{io, fmt};
#[derive(Debug, EnumError)] // EnumError derives From<*>, fmt::Display and error::Error
pub enum Error {
IO(io::Error),
Fmt(fmt::Error),
}
#[macro_use]
extern crate procedurals;
struct B {}
#[derive(NewType)] // NewType derives From<B>, Into<B>, Deref, and DerefMut
struct A(B);