7 releases (2 stable)
Uses old Rust 2015
1.0.1 | Sep 14, 2022 |
---|---|
1.0.0 | Jun 14, 2022 |
0.1.4 | Feb 4, 2022 |
0.1.3 | Aug 16, 2018 |
0.1.0 | Jul 5, 2018 |
#1380 in Procedural macros
97 downloads per month
7KB
118 lines
Diesel enum derive
Please note that this crate is aimed to be simple and stick to a simple usage, no fancy configuration, only Pg
with Text fields.
For a more advanced usage, see this crate: adwhit/diesel-derive-enum
Usage
#[derive(DieselEnum)]
pub enum Role {
Admin,
User,
}
The method Role::Admin.db_value()
returns the database representation of this variant.
Dependencies
~1.5MB
~38K SLoC