add attribute try_from

This commit is contained in:
Zeyi Fan
2019-05-11 23:26:42 -07:00
parent 6dd2b4607f
commit 4c29eea790
11 changed files with 117 additions and 1 deletions
@@ -0,0 +1,9 @@
use serde_derive::Serialize;
#[derive(Serialize)]
#[serde(transparent, try_from = "u64")]
struct S {
a: u8,
}
fn main() {}