6个版本

使用旧Rust 2015

0.3.1 2018年7月8日
0.3.0 2017年12月21日
0.2.3 2017年9月20日
0.2.2 2017年8月23日

#550 in #basic

Download history · Rust 包仓库 72/week @ 2024-03-11 · Rust 包仓库 66/week @ 2024-03-18 · Rust 包仓库 53/week @ 2024-03-25 · Rust 包仓库 98/week @ 2024-04-01 · Rust 包仓库 46/week @ 2024-04-08 · Rust 包仓库 64/week @ 2024-04-15 · Rust 包仓库 69/week @ 2024-04-22 · Rust 包仓库 56/week @ 2024-04-29 · Rust 包仓库 57/week @ 2024-05-06 · Rust 包仓库 65/week @ 2024-05-13 · Rust 包仓库 67/week @ 2024-05-20 · Rust 包仓库 70/week @ 2024-05-27 · Rust 包仓库 63/week @ 2024-06-03 · Rust 包仓库 46/week @ 2024-06-10 · Rust 包仓库 59/week @ 2024-06-17 · Rust 包仓库 60/week @ 2024-06-24 · Rust 包仓库

每月下载 236
7 个crate中使用 (通过 dars)

MIT 协议

8KB
158

过程宏

docs.rs Build Status

基本过程宏集合

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);

依赖

~2MB
~47K SLoC