pub struct BlockGuide {
pub kind: String,
pub rule_id: Option<String>,
pub pos: usize,
pub optional: bool,
pub guidance: Option<String>,
pub limits: Vec<RuleLimit>,
pub labels: Vec<RuleLabel>,
pub bans: Vec<String>,
pub text: Option<String>,
pub example: Option<String>,
pub blocks: Vec<BlockGuide>,
pub line: usize,
}Expand description
BlockGuide holds the guidance of one block.
Fields§
§kind: Stringkind is the kind of the block, as the grammar names it, such as
prose or bullet-list.
rule_id: Option<String>rule_id is the block’s rule-id.
pos: usizepos is the block’s place in the list that declares it, from 1.
optional: booloptional is true when the block can be absent at the states.
guidance: Option<String>guidance is the block’s own guidance.
limits: Vec<RuleLimit>limits holds the block’s own limit, then the limit of each of its
unit rules and line rules, in the schema’s order.
labels: Vec<RuleLabel>labels holds the block’s own label, then the label of each of its
unit rules that declares one, in the schema’s order (CLI-17_AC-37).
bans: Vec<String>bans holds the message of each ban of the block’s unit rules, of
the formats that they bind, and of their line rules, each once, in
order.
text: Option<String>text holds the words of the guidance line before the block: its
guidance, then the words that state each limit and the limit’s
when-at-limit, then the message of each ban. It is absent when the
block has none of them.
example: Option<String>example is the text that the scaffold of the schema writes for the
block, without the indent of an item that holds it. It is absent where
the scaffold writes none. A block that the scaffold writes more than
once gives its first occurrence.
blocks: Vec<BlockGuide>blocks holds the blocks of a group, and the blocks inside the items
of a list, that the states admit, in order.
line: usizeline is the line of the block’s rule in the schema.
Trait Implementations§
Source§impl Clone for BlockGuide
impl Clone for BlockGuide
Source§impl Debug for BlockGuide
impl Debug for BlockGuide
impl Eq for BlockGuide
Source§impl JsonSchema for BlockGuide
impl JsonSchema for BlockGuide
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 BlockGuide
impl PartialEq for BlockGuide
Source§impl Serialize for BlockGuide
impl Serialize for BlockGuide
impl StructuralPartialEq for BlockGuide
Auto Trait Implementations§
impl Forget for BlockGuide
impl Freeze for BlockGuide
impl Move for BlockGuide
impl RefUnwindSafe for BlockGuide
impl Send for BlockGuide
impl Sync for BlockGuide
impl Unpin for BlockGuide
impl UnsafeUnpin for BlockGuide
impl UnwindSafe for BlockGuide
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.