Struct cobalt_config::Frontmatter
source · [−]#[non_exhaustive]pub struct Frontmatter {Show 17 fields
pub permalink: Option<Permalink>,
pub slug: Option<KString>,
pub title: Option<KString>,
pub description: Option<KString>,
pub excerpt: Option<KString>,
pub categories: Option<Vec<KString>>,
pub tags: Option<Vec<KString>>,
pub excerpt_separator: Option<KString>,
pub published_date: Option<DateTime>,
pub format: Option<SourceFormat>,
pub templated: Option<bool>,
pub layout: Option<KString>,
pub is_draft: Option<bool>,
pub weight: Option<i32>,
pub data: Object,
pub pagination: Option<Pagination>,
pub collection: Option<KString>,
}
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.permalink: Option<Permalink>
slug: Option<KString>
title: Option<KString>
description: Option<KString>
excerpt: Option<KString>
categories: Option<Vec<KString>>
excerpt_separator: Option<KString>
published_date: Option<DateTime>
format: Option<SourceFormat>
templated: Option<bool>
layout: Option<KString>
is_draft: Option<bool>
weight: Option<i32>
data: Object
pagination: Option<Pagination>
collection: Option<KString>
Implementations
sourceimpl Frontmatter
impl Frontmatter
pub fn empty() -> Self
pub fn merge_path(self, relpath: &RelativePath) -> Self
pub fn merge(self, other: &Self) -> Self
Trait Implementations
sourceimpl Clone for Frontmatter
impl Clone for Frontmatter
sourcefn clone(&self) -> Frontmatter
fn clone(&self) -> Frontmatter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Frontmatter
impl Debug for Frontmatter
sourceimpl Default for Frontmatter
impl Default for Frontmatter
sourcefn default() -> Frontmatter
fn default() -> Frontmatter
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for Frontmatter where
Frontmatter: Default,
impl<'de> Deserialize<'de> for Frontmatter where
Frontmatter: Default,
sourcefn 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
sourceimpl Display for Frontmatter
impl Display for Frontmatter
sourceimpl PartialEq<Frontmatter> for Frontmatter
impl PartialEq<Frontmatter> for Frontmatter
sourcefn eq(&self, other: &Frontmatter) -> bool
fn eq(&self, other: &Frontmatter) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for Frontmatter
impl Serialize for Frontmatter
impl Eq for Frontmatter
impl StructuralEq for Frontmatter
impl StructuralPartialEq for Frontmatter
Auto Trait Implementations
impl RefUnwindSafe for Frontmatter
impl Send for Frontmatter
impl Sync for Frontmatter
impl Unpin for Frontmatter
impl UnwindSafe for Frontmatter
Blanket Implementations
sourceimpl<V> AdhocValue for V where
V: 'static + Clone + Display + Debug + Send + Sync,
impl<V> AdhocValue for V where
V: 'static + Clone + Display + Debug + Send + Sync,
sourcefn clone_box(&self) -> Box<dyn AdhocValue + 'static, Global>
fn clone_box(&self) -> Box<dyn AdhocValue + 'static, Global>
Clone the value
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.