pub enum EmbedStyle {
Delimited,
CodeBlock,
HtmlScript,
HtmlCode,
Separate,
}Expand description
The archetype family a workspace authors embedded metadata in — the
“embed type” the CLI’s init prompts for, one level above the concrete
EmbedType. A family plus a metadata fig::Format resolves to a
carrier through embed_carrier: e.g. (CodeBlock, YAML) is a
```yaml block, (Delimited, TOML) is a +++ block, and
(Separate, JSON) is a whole-file .json sidecar. It is what the config
document records (via prov’s WorkspaceConfig) so a
workspace stays self-describing about how its metadata is embedded, not
just which format it is written in.
Variants§
Delimited
Character-delimited frontmatter: --- YAML, +++ TOML, ;;; JSON. A
Markdown convention; the fig dialect has no delimiter form.
CodeBlock
A typed fenced code block — ```yaml, ```toml,
```json, ```fig — that renders as a visible block in
Markdown or Djot.
HtmlScript
An HTML <script type="application/…"> data island (not rendered).
HtmlCode
An HTML <pre><code class="language-…"> visible code block.
Separate
Metadata kept in a sibling whole-file document, joined to a plain body
file by a content attribute — neither file carries fences.
Implementations§
Source§impl EmbedStyle
impl EmbedStyle
Sourcepub fn as_config_str(self) -> &'static str
pub fn as_config_str(self) -> &'static str
The embed_type config-document spelling for this style.
Sourcepub fn from_config_str(value: &str) -> Option<Self>
pub fn from_config_str(value: &str) -> Option<Self>
Parse an embed_type config value. Unknown → None (keep the default).
Trait Implementations§
Source§impl Clone for EmbedStyle
impl Clone for EmbedStyle
Source§fn clone(&self) -> EmbedStyle
fn clone(&self) -> EmbedStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EmbedStyle
Source§impl Debug for EmbedStyle
impl Debug for EmbedStyle
impl Eq for EmbedStyle
Source§impl PartialEq for EmbedStyle
impl PartialEq for EmbedStyle
impl StructuralPartialEq for EmbedStyle
Auto Trait Implementations§
impl Freeze for EmbedStyle
impl RefUnwindSafe for EmbedStyle
impl Send for EmbedStyle
impl Sync for EmbedStyle
impl Unpin for EmbedStyle
impl UnsafeUnpin for EmbedStyle
impl UnwindSafe for EmbedStyle
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
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§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
key and return true if they are equal.