Skip to content

Instantly share code, notes, and snippets.

@willemolding
Created October 19, 2021 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willemolding/78ea6081391f5139993dea17c37f77f7 to your computer and use it in GitHub Desktop.
Save willemolding/78ea6081391f5139993dea17c37f77f7 to your computer and use it in GitHub Desktop.
#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct SimplePartialType {
first: u8,
second: Value,
third: bool,
}
let mut de = Deserializer::from_reader_with_layout(example.as_slice(), &rule);
let result: SimplePartialType = Deserialize::deserialize(&mut de).unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment