pub struct HighBlog {
pub hash: HashMap<String, HighBlogEntry>,
pub entries: Vec<HighBlogEntry>,
pub tags: Vec<String>,
pub sitemap: String,
}Expand description
The main HighBlog which stores all relevant information for the blog
hash contains a map from the url slug, which is constructed from the
“slug” field in the BlogJson and the date, to the BlogEntry
entries contains a date-sorted (newest first) Vec of BlogEntry.
Note that entries and hash contain the same information
but in different formats for performance reasons
tags is an unsorted Vec of all unique tags used in the blog
Fields§
§hash: HashMap<String, HighBlogEntry>URL slug to individual blog
Useful when you have a GET request to /blog/<date>/<slug>
entries: Vec<HighBlogEntry>Vec of blog posts, sorted by date
Useful when you want to list all blog posts e.g. on an index page
Vec of all unique tags
Useful when you want to list all tags e.g. on an index page
sitemap: StringXML Representation of the sitemap
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HighBlog
impl<'de> Deserialize<'de> for HighBlog
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HighBlog
impl RefUnwindSafe for HighBlog
impl Send for HighBlog
impl Sync for HighBlog
impl Unpin for HighBlog
impl UnwindSafe for HighBlog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more