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
use std::collections::HashMap; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct BasicServiceInfo { pub name: String, pub service_key: String, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct BasicHashList { pub hashes: Vec<String>, } #[derive(Clone, Default, Deserialize)] pub struct FileMetadataInfo { pub file_id: u64, pub hash: String, pub size: u64, pub mime: String, pub ext: String, pub width: u32, pub height: u32, pub duration: Option<u64>, pub has_audio: bool, pub num_frames: Option<u16>, pub num_words: Option<u64>, pub is_inbox: bool, pub is_local: bool, pub is_trashed: bool, pub known_urls: Vec<String>, pub service_names_to_statuses_to_tags: HashMap<String, HashMap<String, Vec<String>>>, pub service_names_to_statuses_to_display_tags: HashMap<String, HashMap<String, Vec<String>>>, } pub enum FileIdentifier { ID(u64), Hash(String), } pub struct FileRecord { pub bytes: Vec<u8>, pub mime_type: String, }