unsplash_api/types/
orientation.rs

1//! https://unsplash.com/documentation#search-photos
2
3use serde_enum_str::{Deserialize_enum_str, Serialize_enum_str};
4
5#[derive(Deserialize_enum_str, Serialize_enum_str, Debug, Copy, Clone)]
6#[serde(rename_all = "snake_case")]
7pub enum Orientation {
8    Landscape,
9    Portrait,
10    Squarish,
11}
12
13#[cfg(test)]
14mod tests {
15    use super::*;
16
17    #[test]
18    fn to_string() {
19        assert_eq!(Orientation::Landscape.to_string(), "landscape");
20    }
21}