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.
A located embed region in host-file byte coordinates (the content is not
parsed). body is the host prose outside the fences — the suffix after the
close fence for frontmatter, the prefix before the open fence for endmatter.
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.