pub enum Node<'a> {
Show 25 variants
Bold {
end: usize,
start: usize,
},
BoldItalic {
end: usize,
start: usize,
},
Category {
end: usize,
ordinal: Vec<Node<'a>>,
start: usize,
target: &'a str,
},
CharacterEntity {
character: char,
end: usize,
start: usize,
},
Comment {
end: usize,
start: usize,
},
DefinitionList {
end: usize,
items: Vec<DefinitionListItem<'a>>,
start: usize,
},
EndTag {
end: usize,
name: Cow<'a, str>,
start: usize,
},
ExternalLink {
end: usize,
nodes: Vec<Node<'a>>,
start: usize,
},
Heading {
end: usize,
level: u8,
nodes: Vec<Node<'a>>,
start: usize,
},
HorizontalDivider {
end: usize,
start: usize,
},
Image {
end: usize,
start: usize,
target: &'a str,
text: Vec<Node<'a>>,
},
Italic {
end: usize,
start: usize,
},
Link {
end: usize,
start: usize,
target: &'a str,
text: Vec<Node<'a>>,
},
MagicWord {
end: usize,
start: usize,
},
OrderedList {
end: usize,
items: Vec<ListItem<'a>>,
start: usize,
},
ParagraphBreak {
end: usize,
start: usize,
},
Parameter {
default: Option<Vec<Node<'a>>>,
end: usize,
name: Vec<Node<'a>>,
start: usize,
},
Preformatted {
end: usize,
nodes: Vec<Node<'a>>,
start: usize,
},
Redirect {
end: usize,
target: &'a str,
start: usize,
},
StartTag {
end: usize,
name: Cow<'a, str>,
start: usize,
},
Table {
attributes: Vec<Node<'a>>,
captions: Vec<TableCaption<'a>>,
end: usize,
rows: Vec<TableRow<'a>>,
start: usize,
},
Tag {
end: usize,
name: Cow<'a, str>,
nodes: Vec<Node<'a>>,
start: usize,
},
Template {
end: usize,
name: Vec<Node<'a>>,
parameters: Vec<Parameter<'a>>,
start: usize,
},
Text {
end: usize,
start: usize,
value: &'a str,
},
UnorderedList {
end: usize,
items: Vec<ListItem<'a>>,
start: usize,
},
}
Expand description
Parsed node.
Variants§
Bold
Toggle bold text. Parsed from the code '''
.
Fields
BoldItalic
Toggle bold and italic text. Parsed from the code '''''
.
Fields
Category
Category. Parsed from code starting with [[
, a category namespace and :
.
Fields
CharacterEntity
Character entity. Parsed from code starting with &
and ending with ;
.
Fields
Comment
Comment. Parsed from code starting with <!--
.
Fields
DefinitionList
Definition list. Parsed from code starting with :
or ;
.
Fields
items: Vec<DefinitionListItem<'a>>
The list items of the list.
EndTag
End tag. Parsed from code starting with </
and a valid tag name.
Fields
ExternalLink
External link. Parsed from code starting with [
and a valid protocol.
Fields
Heading
Heading. Parsed from code starting with =
and ending with =
.
Fields
HorizontalDivider
Horizontal divider. Parsed from code starting with ----
.
Fields
Image
Image. Parsed from code starting with [[
, a file namespace and :
.
Fields
Italic
Toggle italic text. Parsed from the code ''
.
Fields
Link
Link. Parsed from code starting with [[
and ending with ]]
.
Fields
MagicWord
Magic word. Parsed from the code __
, a valid magic word and __
.
Fields
OrderedList
Ordered list. Parsed from code starting with #
.
Fields
ParagraphBreak
Paragraph break. Parsed from an empty line between elements that can appear within a paragraph.
Fields
Parameter
Parameter. Parsed from code starting with {{{
and ending with }}}
.
Fields
Preformatted
Block of preformatted text. Parsed from code starting with a space at the beginning of a line.
Fields
Redirect
Redirect. Parsed at the start of the wiki text from code starting with #
followed by a redirect magic word.
Fields
StartTag
Start tag. Parsed from code starting with <
and a valid tag name.
Fields
Table
Table. Parsed from code starting with {|
.
Fields
captions: Vec<TableCaption<'a>>
The captions of the table.
Tag
Extension tag. Parsed from code starting with <
and the tag name of a valid extension tag.
Fields
Template
Template. Parsed from code starting with {{
and ending with }}
.
Fields
Text
Plain text.
Fields
UnorderedList
Unordered list. Parsed from code starting with *
.