Struct gazetta_core::view::Page
[−]
[src]
pub struct Page<'a, G> where
G: Gazetta + 'a,
G::PageMeta: 'a,
G::SiteMeta: 'a, {
pub title: &'a str,
pub description: Option<&'a str>,
pub date: Option<&'a Date>,
pub href: &'a str,
pub index: Option<Index<'a, G>>,
pub meta: &'a G::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 Date>
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::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::PageMeta: 'a,
G::SiteMeta: 'a,
[src]
G: Gazetta + 'a,
G::PageMeta: 'a,
G::SiteMeta: 'a,
pub fn for_entry(entry: &'a Entry<G::PageMeta>) -> Self
[src]
Creates a page for an entry. This does not fill in the index.
Trait Implementations
impl<'a, G> Copy for Page<'a, G> where
G: Gazetta + 'a,
G::PageMeta: 'a,
G::SiteMeta: 'a,
[src]
G: Gazetta + 'a,
G::PageMeta: 'a,
G::SiteMeta: 'a,
impl<'a, G> Clone for Page<'a, G> where
G: Gazetta + 'a,
G::PageMeta: 'a,
G::SiteMeta: 'a,
[src]
G: Gazetta + 'a,
G::PageMeta: 'a,
G::SiteMeta: 'a,
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, G> Debug for Page<'a, G> where
G: Gazetta + 'a,
G::PageMeta: Debug + 'a,
G::SiteMeta: 'a,
[src]
G: Gazetta + 'a,
G::PageMeta: Debug + 'a,
G::SiteMeta: 'a,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a, G> Deref for Page<'a, G> where
G: Gazetta + 'a,
G::PageMeta: 'a,
G::SiteMeta: 'a,
[src]
G: Gazetta + 'a,
G::PageMeta: 'a,
G::SiteMeta: 'a,