use reqwest::Error; use serde::{Deserialize, Serialize}; pub trait EmoteBase: Send + Sync { fn get_id(&self) -> &String; fn get_code(&self) -> &String; fn get_original_code(&self) -> &Option; } #[derive(Deserialize, Serialize, Clone, Debug)] pub struct Emote { pub id: String, pub code: String, pub original_code: Option, } impl EmoteBase for Emote { fn get_id(&self) -> &String { &self.id } fn get_code(&self) -> &String { &self.code } fn get_original_code(&self) -> &Option { &self.original_code } } pub trait RetrieveEmoteAPI { async fn get_channel_emotes(&self, channel_login: &str) -> Result, Error>; async fn get_global_emotes(&self) -> Result, Error>; }