openrtb_native1/response/video.rs
1/// 5.6 Video Response Object
2///
3/// Corresponds to the Video Object in the request, yet containing a value of a conforming VAST tag
4/// as a value.
5#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Clone)]
6pub struct Video {
7 /// required; string; -
8 /// vast xml.
9 pub vasttag: String,
10}
11
12#[cfg(test)]
13mod test {
14 use super::*;
15
16 #[test]
17 fn json() -> serde_json::Result<()> {
18 let json = r#"{"vasttag":""}"#;
19 let o1 = Video::default();
20 assert_eq!(serde_json::to_string(&o1)?, json);
21 assert_eq!(o1, serde_json::from_str::<Video>(json)?);
22
23 Ok(())
24 }
25}