[][src]Struct gazetta::view::Page

pub struct Page<'a, G> where
    'a: 'a,
    G: Gazetta + 'a,
    <G as Gazetta>::PageMeta: 'a,
    <G as Gazetta>::SiteMeta: 'a,
    <G as Gazetta>::SiteMeta: 'a,
    <G as Gazetta>::PageMeta: 'a, 
{ pub title: &'a str, pub description: Option<&'a str>, pub date: Option<&'a NaiveDate>, pub href: &'a str, pub index: Option<Index<'a, G>>, pub meta: &'a <G as Gazetta>::PageMeta, pub content: Content<'a>, }

Represents an indevidual page to be rendered.

Fields

title: &'a str

The page's title.

description: Option<&'a str>

An optional description of the page.

date: Option<&'a NaiveDate>

The page's date.

href: &'a str

The page's location.

index: Option<Index<'a, G>>

The index contained in this page, if any.

meta: &'a <G as Gazetta>::PageMeta

Extra metadata specified in the Entry.

content: Content<'a>

The page's content.

If you want to use the default renderer, just render the page itself.

html! {
    div(id="content") : page;
}

Methods

impl<'a, G> Page<'a, G> where
    G: Gazetta + 'a,
    <G as Gazetta>::PageMeta: 'a,
    <G as Gazetta>::SiteMeta: 'a, 
[src]

pub fn for_entry(entry: &'a Entry<<G as Gazetta>::PageMeta>) -> Page<'a, G>[src]

Creates a page for an entry. This does not fill in the index.

Trait Implementations

impl<'a, G> Deref for Page<'a, G> where
    G: Gazetta + 'a,
    <G as Gazetta>::PageMeta: 'a,
    <G as Gazetta>::SiteMeta: 'a, 
[src]

type Target = <G as Gazetta>::PageMeta

The resulting type after dereferencing.

impl<'a, G> Clone for Page<'a, G> where
    G: Gazetta + 'a,
    <G as Gazetta>::PageMeta: 'a,
    <G as Gazetta>::SiteMeta: 'a, 
[src]

impl<'a, G> Copy for Page<'a, G> where
    G: Gazetta + 'a,
    <G as Gazetta>::PageMeta: 'a,
    <G as Gazetta>::SiteMeta: 'a, 
[src]

impl<'a, G> Debug for Page<'a, G> where
    G: Gazetta + 'a,
    <G as Gazetta>::PageMeta: Debug,
    <G as Gazetta>::PageMeta: 'a,
    <G as Gazetta>::SiteMeta: 'a, 
[src]

Auto Trait Implementations

impl<'a, G> Send for Page<'a, G> where
    <G as Gazetta>::PageMeta: Sync

impl<'a, G> Unpin for Page<'a, G>

impl<'a, G> Sync for Page<'a, G> where
    <G as Gazetta>::PageMeta: Sync

impl<'a, G> UnwindSafe for Page<'a, G> where
    <G as Gazetta>::PageMeta: RefUnwindSafe

impl<'a, G> RefUnwindSafe for Page<'a, G> where
    <G as Gazetta>::PageMeta: 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]