Struct piston_meta::meta_rules::Optional
[−]
[src]
pub struct Optional { pub rule: Rule, pub debug_id: DebugId, }
Stores information about optional.
Fields
rule: Rule
The optional rule.
debug_id: DebugId
A debug id to track down the rule generating an error.
Methods
impl Optional
[src]
fn parse(&self, tokenizer: &mut Tokenizer, state: &TokenizerState, chars: &[char], offset: usize, refs: &[(Rc<String>, Rule)]) -> (Range, TokenizerState, Option<(Range, ParseError)>)
Parse optional. Returns the old state if any sub rule fails.
Trait Implementations
impl PartialEq for Optional
[src]
fn eq(&self, __arg_0: &Optional) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Optional) -> bool
This method tests for !=
.
impl Debug for Optional
[src]
impl Clone for Optional
[src]
fn clone(&self) -> Optional
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