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

#550 in #basic

Download history 63/week @ 2024-02-26 76/week @ 2024-03-04 72/week @ 2024-03-11 66/week @ 2024-03-18 53/week @ 2024-03-25 98/week @ 2024-04-01 46/week @ 2024-04-08 64/week @ 2024-04-15 69/week @ 2024-04-22 56/week @ 2024-04-29 57/week @ 2024-05-06 65/week @ 2024-05-13 67/week @ 2024-05-20 70/week @ 2024-05-27 63/week @ 2024-06-03 46/week @ 2024-06-10

254 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
~47K SLoC