unsplash_api/objects/
error_messages.rs

1//! https://unsplash.com/documentation#error-messages
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Deserialize, Serialize, Debug, Clone)]
6pub struct ErrorMessages {
7    pub errors: Vec<String>,
8}
9
10#[cfg(test)]
11mod tests {
12    use super::*;
13
14    #[test]
15    fn de() {
16        match serde_json::from_str::<ErrorMessages>(include_str!(
17            "../../tests/response_body_json_files/err_invalid_access_token.json"
18        )) {
19            Ok(_err_json) => {}
20            Err(err) => panic!("{}", err),
21        }
22    }
23}