The out-of-process carrier of a runtime language: JSON over stdio. Needs
the json feature, since fig reads and writes the wire itself.
The out-of-process carrier: a [Language] served to a fig binary as
JSON over stdin and stdout. [serve] is the request loop a helper
executable runs; the wire format below is what the fig CLI’s helper
runner speaks, and what a helper in any other language implements.
Languages resolved at runtime: the Language trait, the node table its
parse returns, and register, which carries an implementation to the
core as a vtable and hands back a Format that every entry point of
this crate then accepts.
What this build of the fig core can do with a format. Reflects both inherent
support (every format the Format enum exposes parses, edits, and
serializes; the core’s reader-only XML is not surfaced here) and build-time
gating (a format compiled out reports all-false).
The result of Embed::extract: a located Region plus the borrowed host
text, with helpers to slice out the embedded content and body without parsing
or copying.
Controls how Value::serialize_with renders output. The Default is
fig’s historical style (pretty-printed, two-space indent), so
Value::serialize is exactly serialize_with(format, SerializeOptions::default()).
Which embedded config to open — the flat mirror of fig’s parametric
Embed.Type. The three parametric families (markdown ---<lang>
frontmatter, ```<lang> fenced blocks, <script type> HTML data
islands) are enumerated once per format. The first four names are historical
(FrontmatterJson is the ;;; block, FrontmatterFig is the ```fig
fenced block); the rest are grouped by container.
Best-effort sniff of which embed archetype source uses: try each known
archetype’s OPEN delimiter and return the first that matches, or None when
source opens none of them. Only the open delimiter is checked — an
unterminated block is still recognized as its archetype, so a follow-up
Embed::extract/Embed::open surfaces the real error instead of a
misleading “nothing found”. The counterpart to fig’s Language.detect, for
embeds.
Split an embedded region of kind from its host body without parsing or
copying — the read-only (content, body) twin of opening an Embed.
None when content has no such region (or its opening fence has no close).
Both slices borrow content: the first is the text between the fences (no
fences), the second is the host prose outside them.