pub struct Data {
pub full_page: Option<bool>,
pub title: Option<String>,
pub subtitle: Option<String>,
pub author: Option<String>,
pub icon: Option<String>,
pub main: Option<Content>,
pub contents: Option<Vec<Content>>,
pub script: Option<String>,
pub style: Option<String>,
pub links: Option<Vec<Link>>,
pub header: Option<Content>,
pub footer: Option<Content>,
}
Expand description
Data serves both as the configuration data for mdPage as well as the actual template data for generating content.
Fields§
§full_page: Option<bool>
Whether to do full page or not.
title: Option<String>
Title used in header and title of the document.
subtitle: Option<String>
Subtitle used in header.
Author used in metadata.
icon: Option<String>
The favicon link.
main: Option<Content>
The main content used for the front page.
contents: Option<Vec<Content>>
The content of the document.
script: Option<String>
The custom JavaScript to be added in the script
tag.
style: Option<String>
The custom CSS to be added in the style
tag.
links: Option<Vec<Link>>
The custom style and script links.
header: Option<Content>
Custom header content.
Custom footer content.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Data
impl<'de> Deserialize<'de> for Data
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
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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