Crates.io | miniserde-derive-enum |
lib.rs | miniserde-derive-enum |
version | 0.1.1 |
source | src |
created_at | 2019-10-21 12:39:29.323305 |
updated_at | 2019-10-21 12:52:27.583788 |
description | Derive macros for miniserde that support enums. |
homepage | |
repository | https://github.com/eupn/miniserde-derive-enum |
max_upload_size | |
id | 174446 |
size | 17,039 |
Miniserde derive macros that support enum
s.
Provides a minimal Serialize_enum
, Deserialize_enum
derive macros
for enum
support in Miniserde.
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