pub struct DocumentGuide {Show 15 fields
pub path: RepoPath,
pub id: Option<String>,
pub type_name: String,
pub schema: Option<RepoPath>,
pub states: Map<String, Value>,
pub guidance: Option<String>,
pub bans: Vec<String>,
pub text: Option<String>,
pub labels: Vec<LabelGuide>,
pub frontmatter: Vec<KeyGuide>,
pub links: Vec<LinkGuide>,
pub preamble: Option<PreambleGuide>,
pub sections: Vec<SectionGuide>,
pub frontmatter_text: String,
pub body_text: String,
}Expand description
DocumentGuide holds the guidance that a document’s schema gives for
the parts that the document’s lifecycle states admit, in the schema’s
order (CLI-17_AC-6), with each part’s example (CLI-17_AC-38). Each text
holds the words of the guidance line that the scaffold of the schema
writes before the same part at the same states, and each example the
text that the scaffold writes for the part, with the document’s own
frontmatter values.
Fields§
§path: RepoPathpath is the path of the document.
id: Option<String>id is the id of the document. It is absent when the frontmatter
has none.
type_name: Stringtype is the type of the document.
schema: Option<RepoPath>schema is the path of the schema that governs the document. It is
absent for a schema, which the grammar of the schema language
governs. Each line of the guide is a line of this file.
states: Map<String, Value>states maps each lifecycle key, in the order of the lifecycle, to
the state at which the guide shows the document: the document’s own
state, or the state that --state gives.
guidance: Option<String>guidance is the schema’s top-level guidance.
bans: Vec<String>bans holds the message of each ban of the whole body, in order.
text: Option<String>text holds the words of the guidance line that opens the body: the
schema’s guidance, then the message of each ban of the whole body. It
is absent when the schema has neither.
labels: Vec<LabelGuide>labels holds each attribution label that the schema declares, in
the schema’s order, once for the whole document (CLI-17_AC-35). It is
empty for a schema without labels.
frontmatter: Vec<KeyGuide>frontmatter holds each frontmatter key that the schema declares and
the states admit, in the schema’s order, then each lifecycle key.
links: Vec<LinkGuide>links holds each links rule that the states admit, in the schema’s
order, except a rule whose hard limit of 0 bans its links.
preamble: Option<PreambleGuide>preamble is the part of the body before the first heading, where
the schema declares one that the states admit.
sections: Vec<SectionGuide>sections holds each section that the states admit, in the schema’s
order, with each section that declares parent after its parent.
frontmatter_text: Stringfrontmatter_text is the YAML of the document’s frontmatter, from which
the text output leaves out each example of a key that it holds
already. The JSON report leaves this field out.
body_text: Stringbody_text is the document’s body, from which the text output leaves out
each example of a block that it holds already. The JSON report leaves
this field out.
Trait Implementations§
Source§impl Clone for DocumentGuide
impl Clone for DocumentGuide
Source§impl Debug for DocumentGuide
impl Debug for DocumentGuide
impl Eq for DocumentGuide
Source§impl JsonSchema for DocumentGuide
impl JsonSchema for DocumentGuide
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for DocumentGuide
impl PartialEq for DocumentGuide
Source§impl Serialize for DocumentGuide
impl Serialize for DocumentGuide
impl StructuralPartialEq for DocumentGuide
Auto Trait Implementations§
impl Forget for DocumentGuide
impl Freeze for DocumentGuide
impl Move for DocumentGuide
impl RefUnwindSafe for DocumentGuide
impl Send for DocumentGuide
impl Sync for DocumentGuide
impl Unpin for DocumentGuide
impl UnsafeUnpin for DocumentGuide
impl UnwindSafe for DocumentGuide
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.