Enum parse_wiki_text_2::Node
source · 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
Fields
Toggle bold text. Parsed from the code '''.
BoldItalic
Fields
Toggle bold and italic text. Parsed from the code '''''.
Category
Fields
Category. Parsed from code starting with [[, a category namespace and :.
CharacterEntity
Fields
Character entity. Parsed from code starting with & and ending with ;.
Comment
Fields
Comment. Parsed from code starting with <!--.
DefinitionList
Fields
items: Vec<DefinitionListItem<'a>>The list items of the list.
Definition list. Parsed from code starting with : or ;.
EndTag
Fields
End tag. Parsed from code starting with </ and a valid tag name.
ExternalLink
Fields
External link. Parsed from code starting with [ and a valid protocol.
Heading
Fields
Heading. Parsed from code starting with = and ending with =.
HorizontalDivider
Fields
Horizontal divider. Parsed from code starting with ----.
Image
Fields
Image. Parsed from code starting with [[, a file namespace and :.
Italic
Fields
Toggle italic text. Parsed from the code ''.
Link
Fields
Link. Parsed from code starting with [[ and ending with ]].
MagicWord
Fields
Magic word. Parsed from the code __, a valid magic word and __.
OrderedList
Fields
Ordered list. Parsed from code starting with #.
ParagraphBreak
Fields
Paragraph break. Parsed from an empty line between elements that can appear within a paragraph.
Parameter
Fields
Parameter. Parsed from code starting with {{{ and ending with }}}.
Preformatted
Fields
Block of preformatted text. Parsed from code starting with a space at the beginning of a line.
Redirect
Fields
Redirect. Parsed at the start of the wiki text from code starting with # followed by a redirect magic word.
StartTag
Fields
Start tag. Parsed from code starting with < and a valid tag name.
Table
Fields
captions: Vec<TableCaption<'a>>The captions of the table.
Table. Parsed from code starting with {|.
Tag
Fields
Extension tag. Parsed from code starting with < and the tag name of a valid extension tag.
Template
Fields
Template. Parsed from code starting with {{ and ending with }}.
Text
Fields
Plain text.
UnorderedList
Fields
Unordered list. Parsed from code starting with *.