Trait telescope::templates::static_pages::StaticPage [−][src]
pub trait StaticPage {
const TEMPLATE_NAME: &'static str;
const PAGE_TITLE: &'static str;
fn template() -> Template { ... }
fn page(
req: HttpRequest
) -> LocalBoxFuture<'static, Result<Page, TelescopeError>> { ... }
}
Expand description
A piece of static content. This is just a reference to a handlebars file and some metadata for rendering the page.
Associated Constants
const TEMPLATE_NAME: &'static str
const TEMPLATE_NAME: &'static str
The path to the handlebars file.
const PAGE_TITLE: &'static str
const PAGE_TITLE: &'static str
The title of this page.
Provided methods
fn page(
req: HttpRequest
) -> LocalBoxFuture<'static, Result<Page, TelescopeError>>
fn page(
req: HttpRequest
) -> LocalBoxFuture<'static, Result<Page, TelescopeError>>
Create a page containing the static content. This is also the actix handler