/// Create a page. Use default OGP tags. Call API to determine navbar privileges.
Create a page. Use default OGP tags. Call API to determine navbar privileges.
Create a page . Use default OGP tags . Call API to determine navbar privileges .
pub async fn new(
        request: &HttpRequest,
        title: impl Into<String>,
        content: Template,
    ) -> Result<Self, TelescopeError> {
        Ok(Page {
            title: title.into(),
            navbar: Navbar::for_request(request).await?,
            content,
            version: env!("CARGO_PKG_VERSION").to_string(),
            ogp_tags: Tags::for_request(request),
        })
    }
pub async fn new ( request : & HttpRequest , title : impl Into < String > , content : Template , ) -> Result < Self , TelescopeError > { Ok ( Page { title : title . into ( ) , navbar : Navbar :: for_request ( request ) . await ? , content , version : env ! ( " " ) . to_string ( ) , ogp_tags : Tags :: for_request ( request ) , } ) }
Create a page.
Create a page .
request
&HttpRequest
title
impl Into<String>
content
Template