#[non_exhaustive]pub enum WireNode {
Document {
range: Range,
origin: Option<String>,
children: Vec<WireNode>,
},
Session {
range: Range,
origin: Option<String>,
title: String,
marker: Option<String>,
children: Vec<WireNode>,
},
Definition {
range: Range,
origin: Option<String>,
subject: String,
children: Vec<WireNode>,
},
Paragraph {
range: Range,
origin: Option<String>,
inlines: Vec<WireInline>,
},
List {
range: Range,
origin: Option<String>,
marker_style: String,
items: Vec<WireListItem>,
},
Verbatim {
range: Range,
origin: Option<String>,
label: String,
params: Value,
body_text: String,
subject: String,
mode: String,
},
Table {
range: Range,
origin: Option<String>,
caption: String,
header_rows: u32,
column_aligns: Vec<String>,
rows: Vec<WireRow>,
footnotes: Vec<WireFootnote>,
},
Image {
range: Range,
origin: Option<String>,
src: String,
alt: String,
title: Option<String>,
},
Video {
range: Range,
origin: Option<String>,
src: String,
title: Option<String>,
poster: Option<String>,
},
Audio {
range: Range,
origin: Option<String>,
src: String,
title: Option<String>,
},
Annotation {
range: Range,
origin: Option<String>,
label: String,
params: Value,
body: Value,
},
Blank {
range: Range,
origin: Option<String>,
},
}Expand description
A block-level wire AST node. Wire form is a tagged object with "kind"
selecting the variant, plus shared range and optional origin fields.
See the module-level docs for the forward-compatibility contract.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Document
Session
Fields
Definition
Paragraph
List
Verbatim
Fields
Table
Fields
column_aligns: Vec<String>Per-column alignment. One entry per column; values are
"left", "center", "right", or "" (no alignment).
column_aligns.length defines the table’s column count
and MUST equal the longest row in rows; rows MUST NOT
exceed this length. See lex-extension-wire.lex §2.2.
Replaces the single whole-table align: String from
wire_version: 1. The old shape collapsed mixed-alignment
tables (e.g. a markdown pipe-table with | :--- | :---: |)
to a single alignment on the reverse codec.
footnotes: Vec<WireFootnote>Image
Image media node. Produced by on_resolve for
lex.media.image-class verbatim labels; carries the same
data the host would otherwise flatten into verbatim.params.
New in wire_version: 2 — see lex-extension-wire.lex §2.2.
Video
Video media node. New in wire_version: 2.
Audio
Audio media node. New in wire_version: 2.
Annotation
Fields
body: Valuenull for marker-form annotations, a string for opaque-text
bodies, an object { "kind": "block", "children": [...] } for
parsed-Lex bodies. See AnnotationBody
for the corresponding LabelCtx shape.