use { serde::{Deserialize, Serialize}, std::collections::HashMap, }; #[derive(Serialize, Deserialize, Clone, Default)] pub struct Entry { description: Option, author: Option, created: Option, last_modified: Option, name: Option, } impl Entry { pub const fn description(&self) -> &Option { &self.description } pub const fn author(&self) -> &Option { &self.author } pub const fn name(&self) -> &Option { &self.name } pub const fn created(&self) -> &Option { &self.created } pub const fn last_modified(&self) -> &Option { &self.last_modified } } #[derive(Serialize, Deserialize, Clone, Default)] pub struct Blog { name: Option, description: Option, posts: Option>, priority: Option, } impl Blog { pub const fn description(&self) -> &Option { &self.description } pub const fn name(&self) -> &Option { &self.name } pub const fn posts(&self) -> &Option> { &self.posts } pub const fn priority(&self) -> &Option { &self.priority } pub fn from_string(string: &str) -> serde_json::Result { serde_json::from_str(string) } }