Struct pest::Token [] [src]

pub struct Token<Rule> {
    pub rule: Rule,
    pub start: usize,
    pub end: usize,
}

A struct representing tokens generated by a parser.

Fields

rule: Rule

matched Rule

start: usize

starting position in Input

end: usize

ending position in Input

Trait Implementations

impl<Rule: PartialEq> PartialEq for Token<Rule>
[src]

fn eq(&self, __arg_0: &Token<Rule>) -> bool

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

fn ne(&self, __arg_0: &Token<Rule>) -> bool

This method tests for !=.

impl<Rule: Hash> Hash for Token<Rule>
[src]

fn hash<__HRule: Hasher>(&self, __arg_0: &mut __HRule)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl<Rule: Eq> Eq for Token<Rule>
[src]

impl<Rule: Debug> Debug for Token<Rule>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<Rule: Copy> Copy for Token<Rule>
[src]

impl<Rule: Clone> Clone for Token<Rule>
[src]

fn clone(&self) -> Token<Rule>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more