enum-str-derive

Crates.ioenum-str-derive
lib.rsenum-str-derive
version0.1.3
sourcesrc
created_at2023-04-26 03:04:33.919295
updated_at2023-04-26 23:42:02.990919
descriptionA crate to serialize/deserialize enums into/from a string.
homepage
repositoryhttps://github.com/enzious/enum-str-derive
max_upload_size
id848999
size13,280
enzious (enzious)

documentation

https://docs.rs/enum-str-derive

README

enum-str-derive

License Contributors GitHub Repo stars crates.io

A crate to serialize/deserialize enums into/from a string.

Converts enums to a string when using serde and postgres.

Documentation

Implementation

#[derive(Clone, Copy, Debug, EnumStr)]
pub enum ChannelTypeShortcode {
  Text, // TEXT
  #[enum_str(string = "w")]
  Theater, // w
}
Commit count: 8

cargo fmt