Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 445 Bytes

README.md

File metadata and controls

17 lines (12 loc) · 445 Bytes

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.