pub enum ParserType {
Tag,
Alt,
Try,
Map,
TryMap,
Function,
TakeNot,
Repeat,
RepeatIter,
Sequence,
Permutation,
}Expand description
This enum represents the kinds of parsers in Fabparse. This is used in errors to identify the parser that failed.
Variants§
Trait Implementations§
Source§impl Clone for ParserType
impl Clone for ParserType
Source§fn clone(&self) -> ParserType
fn clone(&self) -> ParserType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParserType
impl Debug for ParserType
Source§impl PartialEq for ParserType
impl PartialEq for ParserType
impl Copy for ParserType
impl Eq for ParserType
impl StructuralPartialEq for ParserType
Auto Trait Implementations§
impl Freeze for ParserType
impl RefUnwindSafe for ParserType
impl Send for ParserType
impl Sync for ParserType
impl Unpin for ParserType
impl UnwindSafe for ParserType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, Item, I, E> Parser<'a, I, Item, E, ItemSeqParser> for Item
impl<'a, Item, I, E> Parser<'a, I, Item, E, ItemSeqParser> for Item
Source§fn fab(&self, input: &mut &'a I) -> Result<Item, E>
fn fab(&self, input: &mut &'a I) -> Result<Item, E>
Parses the input. This method advances the input reference to the remaining
unparsed input. The method is named “fab” instead of “parse” to avoid conflicts
with the “parse” method of &str.
Source§fn fab_value<V: Clone>(self, value: V) -> Value<Self, V, I, O, E>where
Self: Sized,
fn fab_value<V: Clone>(self, value: V) -> Value<Self, V, I, O, E>where
Self: Sized,
Returns a parser that replaces the output of the underlying parser with V.
Source§fn fab_map<F>(self, func: F) -> ParserMap<Self, I, O, E, F>where
Self: Sized,
fn fab_map<F>(self, func: F) -> ParserMap<Self, I, O, E, F>where
Self: Sized,
This creates a Map parser that applies the function to the
output of the underlying parser.
Source§fn fab_try_map<F>(self, func: F) -> ParserTryMap<Self, I, O, E, F>where
Self: Sized,
fn fab_try_map<F>(self, func: F) -> ParserTryMap<Self, I, O, E, F>where
Self: Sized,
This parser first maps the input, and if the result is Option::Some or Result::Ok,
it unwraps the input. Othewise, the parser fails.