Skip to content

Simple Enum derive for [Postgres only] Varchar fields

License

Notifications You must be signed in to change notification settings

kycdao/diesel-enum-derive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple Enum derive for [Postgres only] Varchar fields

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%