[][src]Struct gazetta::model::Entry

pub struct Entry<EntryMeta> where
    EntryMeta: Meta
{ pub title: String, pub description: Option<String>, pub date: Option<NaiveDate>, pub index: Option<Index>, pub cc: Vec<String>, pub meta: EntryMeta, pub name: String, pub content: String, pub format: String, }

An entry in the website.

Note: Pages do not correspond one-to-one to Entries (due to pagination).

Fields

title: String

The entry's title.

This is separate from the general metadata for sorting and linking. All entries should have titles.

description: Option<String>

The entry's description.

If present, this will be included in compact indices.

date: Option<NaiveDate>

The entry's date.

This is separate from the general metadata for sorting. Many entries will have dates.

index: Option<Index>

The entries index options (if specified).

cc: Vec<String>

Indices into which this entry should be linked.

meta: EntryMeta

Extra metadata.

name: String

The entry name.

content: String

The content

format: String

Content format

Methods

impl<EntryMeta> Entry<EntryMeta> where
    EntryMeta: Meta
[src]

pub fn from_file<P>(
    full_path: P,
    name: &str
) -> Result<Entry<EntryMeta>, SourceError> where
    P: AsRef<Path>, 
[src]

Trait Implementations

impl<EntryMeta> Clone for Entry<EntryMeta> where
    EntryMeta: Clone + Meta
[src]

impl<EntryMeta> Debug for Entry<EntryMeta> where
    EntryMeta: Debug + Meta
[src]

Auto Trait Implementations

impl<EntryMeta> Send for Entry<EntryMeta> where
    EntryMeta: Send

impl<EntryMeta> Unpin for Entry<EntryMeta> where
    EntryMeta: Unpin

impl<EntryMeta> Sync for Entry<EntryMeta> where
    EntryMeta: Sync

impl<EntryMeta> UnwindSafe for Entry<EntryMeta> where
    EntryMeta: UnwindSafe

impl<EntryMeta> RefUnwindSafe for Entry<EntryMeta> where
    EntryMeta: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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