pub enum AnyParser<'input, I, T>{
String {
parser: Parser<'input, StrInput<'input>>,
name: String,
},
Iter {
parser: Parser<'static, BufferedInput<I>>,
name: String,
},
Custom {
parser: Parser<'input, T>,
name: String,
},
Replay {
parser: ReplayParser<'input>,
name: String,
},
}Expand description
A wrapper for different types of parsers.
Variants§
String
A parser over borrowed string input.
Fields
§
name: StringHuman-readable source name returned by ParserStack::stack.
Iter
A parser over an iterator of characters.
Fields
§
parser: Parser<'static, BufferedInput<I>>Parser currently producing events for this stack entry.
§
name: StringHuman-readable source name returned by ParserStack::stack.
Custom
A parser over a custom input.
Fields
§
name: StringHuman-readable source name returned by ParserStack::stack.
Replay
A parser over a replayed event stream.
Fields
§
parser: ReplayParser<'input>Replay parser currently producing pre-collected events for this stack entry.
§
name: StringHuman-readable source name returned by ParserStack::stack.
Auto Trait Implementations§
impl<'input, I, T> Freeze for AnyParser<'input, I, T>
impl<'input, I, T> RefUnwindSafe for AnyParser<'input, I, T>where
T: RefUnwindSafe,
I: RefUnwindSafe,
impl<'input, I, T> Send for AnyParser<'input, I, T>
impl<'input, I, T> Sync for AnyParser<'input, I, T>
impl<'input, I, T> Unpin for AnyParser<'input, I, T>
impl<'input, I, T> UnsafeUnpin for AnyParser<'input, I, T>where
T: UnsafeUnpin,
I: UnsafeUnpin,
impl<'input, I, T> UnwindSafe for AnyParser<'input, I, T>where
T: UnwindSafe,
I: UnwindSafe,
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