Struct blog_tools::medium::MediumBlogEntry
source · pub struct MediumBlogEntry {
pub title: String,
pub date: NaiveDate,
pub desc: Option<String>,
pub slug: String,
pub tags: Vec<String>,
pub toc: Option<String>,
pub keywords: Option<Vec<String>>,
pub canonical_link: Option<String>,
pub author_name: Option<String>,
pub author_webpage: Option<String>,
pub preview: String,
/* private fields */
}
Expand description
An individual blog post. You will need to render this using render
Fields§
§title: String
Title of the blog post
date: NaiveDate
Date published
desc: Option<String>
Description
slug: String
The URL slug
Vec
of tags for this blog
toc: Option<String>
Table of contents
keywords: Option<Vec<String>>
Optional Vec
of keywords. Intended for SEO in comparison to tags
canonical_link: Option<String>
Optional canonical link, intended for SEO
Optional author name
Optional URL for the author
preview: String
Preview of the blogpost, useful for showing on index pages
Implementations§
source§impl MediumBlogEntry
impl MediumBlogEntry
sourcepub fn render(&self, base: PathBuf) -> Result<HighBlogEntry, BlogError>
pub fn render(&self, base: PathBuf) -> Result<HighBlogEntry, BlogError>
Use this function to render a MediumBlogEntry
into a HighBlogEntry
,
which then contains the full blog HTML you can return to a user
Trait Implementations§
source§impl Clone for MediumBlogEntry
impl Clone for MediumBlogEntry
source§fn clone(&self) -> MediumBlogEntry
fn clone(&self) -> MediumBlogEntry
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MediumBlogEntry
impl Debug for MediumBlogEntry
source§impl<'de> Deserialize<'de> for MediumBlogEntry
impl<'de> Deserialize<'de> for MediumBlogEntry
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 MediumBlogEntry
impl RefUnwindSafe for MediumBlogEntry
impl Send for MediumBlogEntry
impl Sync for MediumBlogEntry
impl Unpin for MediumBlogEntry
impl UnwindSafe for MediumBlogEntry
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