pub struct SectionGuide {
pub heading: String,
pub level: u8,
pub rule_id: Option<String>,
pub parent: Option<String>,
pub optional: bool,
pub repeat: bool,
pub held: bool,
pub guidance: Option<String>,
pub text: Option<String>,
pub example: Option<String>,
pub blocks: Vec<BlockGuide>,
pub line: usize,
}Expand description
SectionGuide holds the guidance of one section.
Fields§
§heading: Stringheading is the heading as a finding of validate names it: its
text, its template or pattern, or <key> for a heading that takes
the value of the frontmatter key key.
level: u8level is the level of the heading.
rule_id: Option<String>rule_id is the section’s rule-id.
parent: Option<String>parent is the rule-id of the section that this one lies inside.
optional: booloptional is true when the section can be absent at the states.
repeat: boolrepeat is true when the heading can occur more than once.
held: boolheld is true when tramlines-md’s match of a heading to its section
gives the section a heading at its level whose reading, as
tramlines-md normalises it, has the section’s heading shape, or one
of its renamed-from texts (CLI-17_AC-15).
guidance: Option<String>guidance is the section’s own guidance.
text: Option<String>text holds the words of the guidance line before the heading.
example: Option<String>example is the text that the scaffold of the schema writes for the
section: each occurrence, from its heading, with the sections inside
it and the section’s examples. It is absent where the scaffold
writes none. A section inside a repeating one gives the text of its
first occurrence.
blocks: Vec<BlockGuide>blocks holds each block of the section’s body that the states
admit, in order.
line: usizeline is the line of the section’s rule in the schema.
Trait Implementations§
Source§impl Clone for SectionGuide
impl Clone for SectionGuide
Source§impl Debug for SectionGuide
impl Debug for SectionGuide
impl Eq for SectionGuide
Source§impl JsonSchema for SectionGuide
impl JsonSchema for SectionGuide
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 SectionGuide
impl PartialEq for SectionGuide
Source§impl Serialize for SectionGuide
impl Serialize for SectionGuide
impl StructuralPartialEq for SectionGuide
Auto Trait Implementations§
impl Forget for SectionGuide
impl Freeze for SectionGuide
impl Move for SectionGuide
impl RefUnwindSafe for SectionGuide
impl Send for SectionGuide
impl Sync for SectionGuide
impl Unpin for SectionGuide
impl UnsafeUnpin for SectionGuide
impl UnwindSafe for SectionGuide
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.