add attribute try_from

This commit is contained in:
Zeyi Fan committed 2019-05-11 23:31:24 -07:00
1 parent 6dd2b4607f
commit 4c29eea790
11 files changed
+117 -1

No files matched your search

@@ -0,0 +1,9 @@
use serde_derive::Serialize;
#[derive(Serialize)]
#[serde(transparent, try_from = "u64")]
struct S {
a: u8,
}
fn main() {}