miniserde-derive-enum

Crates.iominiserde-derive-enum
lib.rsminiserde-derive-enum
version0.1.1
sourcesrc
created_at2019-10-21 12:39:29.323305
updated_at2019-10-21 12:52:27.583788
descriptionDerive macros for miniserde that support enums.
homepage
repositoryhttps://github.com/eupn/miniserde-derive-enum
max_upload_size
id174446
size17,039
(eupn)

documentation

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

README

miniserde-derive-enum

Crates.io License Downloads

Miniserde derive macros that support enums.

Provides a minimal Serialize_enum, Deserialize_enum derive macros for enum support in Miniserde.

Example

use miniserde::{Serialize, Deserialize};
use miniserde_derive_enum::{Serialize_enum, Deserialize_enum};

pub fn main() {
   #[derive(Serialize_enum, Deserialize_enum)]
   enum E {
       Unit,
       Struct { a: u8, b: String, c: Box<E> },
       Tuple(u8, String),
   }
}

License: MIT OR Apache-2.0

Commit count: 16

cargo fmt