pub struct KeyGuide {
pub key: String,
pub lifecycle: bool,
pub optional: bool,
pub guidance: Option<String>,
pub limit: Option<GuideLimit>,
pub text: Option<String>,
pub example: Option<String>,
pub line: usize,
}Expand description
KeyGuide holds the guidance of one frontmatter key.
Fields§
§key: Stringkey is the key.
lifecycle: boollifecycle is true when the key is a lifecycle key rather than a
declared one.
optional: booloptional is true when the key can be absent.
guidance: Option<String>guidance is the key’s own guidance.
limit: Option<GuideLimit>limit is the limit on the elements of the key’s list. It is absent
when the key has no max.
text: Option<String>text holds the words of the guidance line before the key: sokf’s own
text for the key, which is the rule for writing a description, then
the key’s guidance, then the words that state its limit and the limit’s
when-at-limit. It is absent when the key has none of them.
example: Option<String>example is the line that the scaffold of the schema writes for the
key, with the document’s own values, such as priority: medium. It is
absent where the scaffold writes none.
line: usizeline is the line of the key’s rule in the schema.
Trait Implementations§
impl Eq for KeyGuide
Source§impl JsonSchema for KeyGuide
impl JsonSchema for KeyGuide
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 moreimpl StructuralPartialEq for KeyGuide
Auto Trait Implementations§
impl Forget for KeyGuide
impl Freeze for KeyGuide
impl Move for KeyGuide
impl RefUnwindSafe for KeyGuide
impl Send for KeyGuide
impl Sync for KeyGuide
impl Unpin for KeyGuide
impl UnsafeUnpin for KeyGuide
impl UnwindSafe for KeyGuide
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.