Enum mediawiki_parser::Element
[−]
[src]
pub enum Element { Document(Document), Heading(Heading), Text(Text), Formatted(Formatted), Paragraph(Paragraph), Template(Template), TemplateArgument(TemplateArgument), InternalReference(InternalReference), ExternalReference(ExternalReference), ListItem(ListItem), List(List), Table(Table), TableRow(TableRow), TableCell(TableCell), Comment(Comment), HtmlTag(HtmlTag), Gallery(Gallery), Error(Error), }
Element types used in the abstract syntax tree (AST).
Each element must keep track of its position in the original input document. After parsing, the document tree can be serialized by serde.
Variants
Document(Document)
Heading(Heading)
Text(Text)
Formatted(Formatted)
Paragraph(Paragraph)
Template(Template)
TemplateArgument(TemplateArgument)
InternalReference(InternalReference)
ExternalReference(ExternalReference)
ListItem(ListItem)
List(List)
Table(Table)
TableRow(TableRow)
TableCell(TableCell)
Comment(Comment)
HtmlTag(HtmlTag)
Gallery(Gallery)
Error(Error)
Methods
impl Element
[src]
pub fn get_position(&self) -> &Span
[src]
returns the source code position of an element.
pub fn get_position_mut(&mut self) -> &mut Span
[src]
returns a mutable reference the source code position of an element.
pub fn get_variant_name(&self) -> &str
[src]
returns the variant name of an element.
Trait Implementations
impl Debug for Element
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Element
[src]
fn eq(&self, __arg_0: &Element) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Element) -> bool
[src]
This method tests for !=
.