6 releases
Uses old Rust 2015
0.3.1 | Jul 8, 2018 |
---|---|
0.3.0 | Dec 21, 2017 |
0.2.3 | Sep 20, 2017 |
0.2.2 | Aug 23, 2017 |
#558 in #basic
233 downloads per month
Used in 7 crates
(via dars)
8KB
158 lines
Procedurals
Collection of basic proc-macros
IntoEnum
#[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),
}
EnumError
#[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),
}
NewType
#[macro_use]
extern crate procedurals;
struct B {}
#[derive(NewType)] // NewType derives From<B>, Into<B>, Deref, and DerefMut
struct A(B);
Dependencies
~2MB
~48K SLoC