Enum piston_meta::meta_rules::Rule [] [src]

pub enum Rule {
    Whitespace(Whitespace),
    Tag(Tag),
    UntilAny(UntilAny),
    UntilAnyOrWhitespace(UntilAnyOrWhitespace),
    Text(Text),
    Number(Number),
    Select(Select),
    Sequence(Sequence),
    SeparateBy(Box<SeparateBy>),
    Repeat(Box<Repeat>),
    Lines(Box<Lines>),
    Node(Node),
    Optional(Box<Optional>),
    Not(Box<Not>),
}

A rule describes how some section of a document should be parsed.

Variants

Read whitespace.

Match against a tag.

Reads until any character.

Read until any character or whitespace.

Read text.

Read number.

Select one of the sub rules. If the first one does not succeed, try another and so on. If all sub rules fail, then the rule fails.

Run each sub rule in sequence. If any sub rule fails, the rule fails.

Repeat rule separated by another rule.

Repeat rule.

Repeat rule separated by one or more lines.

Read node.

Read optional.

Read not.

Methods

impl Rule
[src]

Parses rule.

Updates replacing names with the references.

The references contains the name, but this can not be borrowed as when the same reference is updated.

Trait Implementations

impl Clone for Rule
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Rule
[src]

Formats the value using the given formatter.

impl PartialEq for Rule
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.