#[non_exhaustive]pub enum DocumentFrontmatter {
Absent,
Mapping {
value: Map<String, Value>,
location: FrontmatterLocation,
anchors: FrontmatterAnchors,
},
Invalid {
location: FrontmatterLocation,
message: String,
},
}Expand description
Frontmatter extracted from the first lines of a Markdown document.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Absent
The document does not start with a YAML frontmatter delimiter.
Mapping
A YAML mapping converted to the JSON value domain used by JSON Schema.
Fields
§
location: FrontmatterLocationSource location of the complete delimited block.
§
anchors: FrontmatterAnchorsPositions of the entries inside the block, keyed by JSON Pointer.
An entry whose spelling has no character of its own — a block
scalar with no content line — is absent; callers then fall back to
Self::Mapping::location.
Invalid
A delimited block exists but is not a valid JSON-compatible YAML mapping.
Fields
§
location: FrontmatterLocationSource location of the opening delimiter through the closing delimiter or end of file.
Trait Implementations§
Source§impl Clone for DocumentFrontmatter
impl Clone for DocumentFrontmatter
Source§fn clone(&self) -> DocumentFrontmatter
fn clone(&self) -> DocumentFrontmatter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentFrontmatter
impl Debug for DocumentFrontmatter
impl Eq for DocumentFrontmatter
Source§impl PartialEq for DocumentFrontmatter
impl PartialEq for DocumentFrontmatter
impl StructuralPartialEq for DocumentFrontmatter
Auto Trait Implementations§
impl Freeze for DocumentFrontmatter
impl RefUnwindSafe for DocumentFrontmatter
impl Send for DocumentFrontmatter
impl Sync for DocumentFrontmatter
impl Unpin for DocumentFrontmatter
impl UnsafeUnpin for DocumentFrontmatter
impl UnwindSafe for DocumentFrontmatter
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
Mutably borrows from an owned value. Read more
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,
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
Compare self to
key and return true if they are equal.