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

Download history 39/week @ 2024-07-21 80/week @ 2024-07-28 67/week @ 2024-08-04 90/week @ 2024-08-11 60/week @ 2024-08-18 71/week @ 2024-08-25 77/week @ 2024-09-01 58/week @ 2024-09-08 45/week @ 2024-09-15 95/week @ 2024-09-22 64/week @ 2024-09-29 23/week @ 2024-10-06 57/week @ 2024-10-13 56/week @ 2024-10-20 54/week @ 2024-10-27 63/week @ 2024-11-03

233 downloads per month
Used in 7 crates (via dars)

MIT license

8KB
158 lines

Procedurals

docs.rs Build Status

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