Skip to main content

Module document

Module document 

Source
Expand description

Parsing and typed in-memory model for Quillmark card-yaml documents.

§Key types

  • Document: Root card plus ordered composable cards.
  • Card: A single card block carrying a Payload and a Markdown body.
  • Payload: Source-ordered items — $quill/$kind/$id metadata, user fields, and comments — from a block’s YAML content.
  • PayloadItem: The item variant — Quill/Kind/Id/Field/Comment.

§Errors

Document::from_markdown 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_81_0;
pub use dto::SCHEMA_V0_82_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::Payload;
pub use payload::PayloadItem;

Modules§

assemble
Assembly of card-yaml blocks into a Document.
dto
Versioned, storage-stable serialization for Document.
edit
Typed mutators for Document and Card with invariant enforcement.
emit
Canonical Markdown emission for Document.
fences
Line-oriented fence scanner for Quillmark card-yaml blocks.
limits
Size and depth budget constants for document parsing.
meta
Validation helpers for card-yaml $-prefixed system metadata.
payload
Unified payload representation.
prescan
Pre-scan of a card-yaml block’s YAML payload to recover features that serde_saphyr discards.

Structs§

Card
A single card-yaml block (root or composable). body is "" when no content follows the closing fence; check card.body().is_empty().
Document
A fully-parsed Quillmark document. Serde routes through StoredDocument; for the plate wire shape see Document::to_plate_json.
ParseOutput
Parse result with the document and any non-fatal warnings.

Constants§

FORMAT_RULES
Authoring-format rules for the ~~~ card-yaml markdown surface.

Functions§

blueprint_instruction
Render the blueprint-instruction header with quill_name substituted in. Single source of truth for the prose so every binding shows identical text.