mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-11-14 19:27:07 +00:00
add attribute try_from
This commit is contained in:
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() {}
|
||||
Reference in new issue
Block a user