Skip to main content

ShellSlots

Struct ShellSlots 

Source
pub struct ShellSlots {
    pub lang: String,
    pub document_title: String,
    pub site_title: String,
    pub body_class: String,
    pub head: String,
    pub site_nav: String,
    pub breadcrumbs: String,
    pub content: String,
    pub footer: String,
    pub scripts: String,
}
Expand description

The named values a shell template is filled with.

Text fields hold their unescaped text; escaping happens where the slot is filled, so a value is escaped exactly once no matter which shell renders it.

Fields§

§lang: String

{{lang}} — the document language, for <html lang="…">.

§document_title: String

{{document_title}} — the <title> text: "Entry - Site", or just the site’s name on the page that is the site.

§site_title: String

{{site_title}} — the site’s name on its own.

§body_class: String

{{body_class}} — the class list for <body>, to be written inside class="…". Empty when the page has no site nav.

§head: String

{{{head}}} — stylesheet link, favicon link, SEO meta, feed links and the page’s own styles:, as a newline-separated run of tags indented four spaces. Does not include <title>, which is its own slot.

§site_nav: String

{{{site_nav}}} — the site navigation sidebar. Empty when the site has no nav tree.

§breadcrumbs: String

{{{breadcrumbs}}} — the breadcrumb trail for this page.

§content: String

{{{content}}} — the rendered body, with its links already rewritten.

§footer: String

{{{footer}}} — the built-in attribution footer.

§scripts: String

{{{scripts}}} — the built-in interactivity script and the page’s own scripts:, as a newline-separated run of tags indented four spaces.

Trait Implementations§

Source§

impl Clone for ShellSlots

Source§

fn clone(&self) -> ShellSlots

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ShellSlots

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ShellSlots

Source§

fn default() -> ShellSlots

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.