Skip to content

Instantly share code, notes, and snippets.

@esell
Created September 23, 2016 21:07
Show Gist options
  • Save esell/8537958cf23e417ae0a71b3e82587253 to your computer and use it in GitHub Desktop.
Save esell/8537958cf23e417ae0a71b3e82587253 to your computer and use it in GitHub Desktop.
#[derive(Deserialize, Debug)]
struct GDAXMsg {
#[serde(rename="type")]
type_: MsgType,
time: String,
product_id: String,
sequence: u32,
order_id: Option<String>,
side: String,
}
...
let gmsg: GDAXMsg = serde_json::from_str(payload_string).unwrap();
println!("{:?}", gmsg);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment