| Crates.io | diesel_enum_derive |
| lib.rs | diesel_enum_derive |
| version | 1.0.1 |
| created_at | 2018-07-05 09:23:50.625196+00 |
| updated_at | 2022-09-14 15:48:29.3646+00 |
| description | Simple Enum derive for [Postgres only] Varchar fields |
| homepage | https://github.com/terry90/diesel-enum-derive |
| repository | https://github.com/terry90/diesel-enum-derive |
| max_upload_size | |
| id | 72956 |
| size | 7,963 |
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
#[derive(DieselEnum)]
pub enum Role {
Admin,
User,
}
The method Role::Admin.db_value() returns the database representation of this variant.