1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
use serde::Deserialize; #[derive(Clone, Debug, Deserialize)] pub struct Image { pub url: String, pub snowflake: String, pub nsfw: bool, pub tag: String } #[derive(Clone, Debug, Deserialize)] pub struct RedditImage { pub title: String, pub image_url: String, pub source: String, pub subreddit: String, pub upvotes: u64, pub downvotes: u64, pub comments: u64, pub created_at: f64, pub nsfw: bool, pub author: String, pub awards: u64 } #[derive(Clone, Debug, Deserialize)] pub struct WikiHowImage { pub url: String, pub title: String, pub nsfw: bool, pub article_url: String } #[derive(Clone, Debug, Deserialize)] pub struct TagModel { pub name: String, pub nsfw: bool, } #[derive(Clone, Debug, Deserialize)] pub struct TagList { pub models: Option<Vec<TagModel>>, pub tags: Vec<String>, pub nsfw_tags: Option<Vec<String>> }