[][src]Struct mdblog::Post

pub struct Post {
    pub path: PathBuf,
    pub title: String,
    pub url: PathBuf,
    pub headers: PostHeaders,
    pub content: String,
    // some fields omitted
}

blog post

every blog post is composed of head part and body part. the two part is separated by the first blank line.

Fields

path: PathBuf

post path from relative root directory

title: String

the post title

url: PathBuf

the post url

headers: PostHeaders

post headers

content: String

post html body

Implementations

impl Post[src]

pub fn new<P: AsRef<Path>>(root: P, path: P) -> Result<Post>[src]

pub fn src(&self) -> PathBuf[src]

the absolute path of blog post markdown file.

pub fn dest(&self) -> PathBuf[src]

the absolute path of blog post html file.

Trait Implementations

impl Serialize for Post[src]

Auto Trait Implementations

impl RefUnwindSafe for Post

impl Send for Post

impl Sync for Post

impl Unpin for Post

impl UnwindSafe for Post

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, I> AsResult<T, I> for T where
    I: Input, 

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoCollection<T> for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,