mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 10:38:02 +00:00
add attribute try_from
This commit is contained in:
@@ -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