pub struct PageMetadata {
pub title: Option<String>,
pub template: Option<String>,
pub embed: Option<EmbedMetadata>,
pub scripts: Vec<String>,
pub styles: Vec<String>,
pub extra: Option<ExtraData>,
pub userdata: Value,
pub is_partial: bool,
}Expand description
Struct for the front matter in pages.
Fields§
§title: Option<String>The page’s title.
template: Option<String>The template to use for the page. If not specified, it defaults to “base”.
embed: Option<EmbedMetadata>custom embed info for a template
scripts: Vec<String>The page’s custom scripts, if any.
styles: Vec<String>the page’s custom styles, if any.
extra: Option<ExtraData>The extra stuff to run for the page, if any.
userdata: ValueCustom values passed to the base template.
is_partial: boolWhether this page being rendered is a partial. Set by the builder, not your page metadata.
Trait Implementations§
Source§impl Debug for PageMetadata
impl Debug for PageMetadata
Source§impl Default for PageMetadata
impl Default for PageMetadata
Source§fn default() -> PageMetadata
fn default() -> PageMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PageMetadata
impl<'de> Deserialize<'de> for PageMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PageMetadata
impl RefUnwindSafe for PageMetadata
impl Send for PageMetadata
impl Sync for PageMetadata
impl Unpin for PageMetadata
impl UnwindSafe for PageMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more