Trait combine::parser::ParseMode
[−]
[src]
pub trait ParseMode: Copy { fn is_first(self) -> bool; fn set_first(&mut self); fn parse_consumed<P>(
self,
parser: &mut P,
input: &mut P::Input,
state: &mut P::PartialState
) -> ConsumedResult<P::Output, P::Input>
where
P: Parser, { ... } }
Specifies whether the parser must check for partial state that must be resumed
Required Methods
fn is_first(self) -> bool
If true
then the parser has no previous state to resume otherwise the parser might have
state to resume which it must check.
fn set_first(&mut self)
Puts the mode into first
parsing.
Provided Methods
fn parse_consumed<P>(
self,
parser: &mut P,
input: &mut P::Input,
state: &mut P::PartialState
) -> ConsumedResult<P::Output, P::Input> where
P: Parser,
self,
parser: &mut P,
input: &mut P::Input,
state: &mut P::PartialState
) -> ConsumedResult<P::Output, P::Input> where
P: Parser,
Implementors
impl ParseMode for FirstMode
impl ParseMode for PartialMode