pub struct KindSpec {
pub format: Format,
pub front_matter: FrontMatterRule,
pub without_front_matter: Option<String>,
pub schema: Option<String>,
pub identity: Vec<String>,
pub title: Option<String>,
pub description: Option<String>,
pub schema_version: Option<SchemaVersion>,
pub members: Option<String>,
}Expand description
One entry of kinds.yaml.
Fields§
§format: FormatHow the file is read.
front_matter: FrontMatterRuleFor markdown, whether front matter must, may, or must not be present.
without_front_matter: Option<String>For a markdown kind with optional or required front matter: the kind a file that carries none is read as instead (the rules tree’s own README is a document).
schema: Option<String>The document schema the file must satisfy, by identity (majordomus.rule/v1,
which is schemas/majordomus/rule/rule.v1.*); absent means no contract.
identity: Vec<String>The metadata fields joined with @ that make the identity; empty means the path.
title: Option<String>The field holding the title, or @heading for the first level-one heading.
description: Option<String>The field holding the one-line description.
schema_version: Option<SchemaVersion>A field that must carry one of the supported values.
members: Option<String>For a yaml kind: the file’s list that holds the objects, one object per item
(claims for docs/CLAIMS.yaml). Identity, title and description are then read
from each item; schema_version still applies to the file.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KindSpec
impl<'de> Deserialize<'de> for KindSpec
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>,
impl Eq for KindSpec
impl StructuralPartialEq for KindSpec
Auto Trait Implementations§
impl Freeze for KindSpec
impl RefUnwindSafe for KindSpec
impl Send for KindSpec
impl Sync for KindSpec
impl Unpin for KindSpec
impl UnsafeUnpin for KindSpec
impl UnwindSafe for KindSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.