pub struct DirectiveInfo {
pub rows_span: Range<usize>,
pub name: String,
pub attrs: Vec<(String, Option<String>)>,
pub label: String,
}Expand description
One leaf directive (::name{…}) as a frontend sees it: which rows its
placeholder occupies, its type, and its attributes. A plain surface paints
the ⧉ name placeholder glyphs as-is; a frontend that knows the host app’s
vocabulary skips the rows in rows_span and paints the real thing there,
exactly as an image-capable one does with MediaInfo. Derived from
VRow::leaf_directive by [directive_spans].
Core resolves nothing here — it has no idea what an embed or a toc is,
and deliberately so: the directive vocabulary belongs to the app on top.
Fields§
§rows_span: Range<usize>The VisualMap::rows rows this directive’s placeholder occupies — the
label row plus any blank fillers under it.
name: StringThe directive’s type (embed, toc, vis), no leading colons.
attrs: Vec<(String, Option<String>)>Its {…} attributes in source order; a bare one has a None value.
label: StringIts [label] text, flattened from its inline children (empty when it has
none) — what the placeholder row shows.
Implementations§
Trait Implementations§
Source§impl Clone for DirectiveInfo
impl Clone for DirectiveInfo
Source§fn clone(&self) -> DirectiveInfo
fn clone(&self) -> DirectiveInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more