Expand description
Parsing and typed in-memory model for Quillmark card-yaml documents.
A Document holds a root Card plus ordered composable cards; each
card carries a Payload, source-ordered items (PayloadItem:
$quill/$kind/$id metadata, user fields, and comments, in the order
they appear in the block’s YAML content), and a Markdown body.
Document::parse returns errors for malformed YAML, unclosed
fences, a missing root $quill, or unknown $-prefixed system keys.
See markdown-spec.md for the card-yaml format specification.
Re-exports§
pub use dto::peek_schema_version;pub use dto::StorageError;pub use dto::StoredDocument;pub use dto::SCHEMA_V0_93_0;pub use edit::EditError;pub use meta::is_valid_kind_name;pub use meta::validate_composable_kind;pub use meta::CardKindError;pub use payload::MetaKey;pub use payload::Payload;pub use payload::PayloadItem;pub use prescan::CommentPathSegment;pub use wire::CardWire;pub use wire::PayloadItemWire;pub use wire::WireError;
Modules§
- assemble
- Assembly of card-yaml blocks into a
Document. - dto
- Versioned, storage-stable serialization for
Document. - edit
- Typed mutators for
DocumentandCardwith invariant enforcement. - emit
- Canonical Markdown emission for
Document. - fences
- Line-oriented fence scanner for Quillmark card-yaml blocks.
- limits
- Nesting-depth budget for document parsing.
- meta
- Validation helpers for card-yaml
$-prefixed system metadata. - payload
- Unified payload representation.
- wire
- Canonical live wire form of a
Cardfor language-binding APIs.
Structs§
- Card
- A single card-yaml block (root or composable).
bodyis the content (Content) form of the prose after the closing fence: the empty content when none follows; checkcard.body().is_blank(). Markdown is a projection:Card::body_markdownre-emits it. - Document
- A fully-parsed Quillmark document. Serde routes through
StoredDocument; for the plate wire shape seeDocument::to_plate_json. - Nested
Comment - A comment inside a nested mapping or sequence.
- Parsed
- The record of one parse: the
Documentand any non-fatal warnings. Returned byDocument::parse, the single parse entry. Warnings live here and only here:Documentis the value (equality, the storage DTO, and mutators all exclude warnings);Parsedis the parse event. A caller that wants only the document writesDocument::parse(md)?.document. - Seed
Overlay - A parsed, per-kind seed overlay: the sparse fields (and optional body)
a newly-added card of a given kind starts with. Built from a
$seed[<kind>]entry of the main card’sCard::seedmap viaSeedOverlay::from_json, and layered over the quill’s schema-example seed bycrate::Quill::seed_card(overlay › example › absent). The reserved inner key$bodycarries the body override; every other user field becomes an entry, while any other$-prefixed key is reserved and dropped.
Enums§
- Richtext
Decode Error - Which encoding a
decode_richtext_valuefailure came from, so a call site can prefix its diagnostic per encoding without re-deriving the dispatch. Surfaced publicly as the error ofCard::field_richtext.
Constants§
- FORMAT_
RULES - Authoring-format rules for the
~~~card-yaml markdown surface.
Functions§
- blueprint_
instruction - Render the blueprint-instruction header with
quill_namesubstituted in. Single source of truth for the prose so every binding shows identical text.