pub enum ThenLazyParserState<P1: Parser, P2: Parser> {
FirstParser(P1::PartialState),
SecondParser {
first_output: P1::Output,
second_parser: Arc<P2>,
second_state: P2::PartialState,
},
}Expand description
State of a then lazy parser.
Variants§
FirstParser(P1::PartialState)
The first parser is incomplete.
SecondParser
The first parser is finished, and the second parser is incomplete.
Implementations§
Source§impl<P1: Parser, P2: Parser> ThenLazyParserState<P1, P2>
impl<P1: Parser, P2: Parser> ThenLazyParserState<P1, P2>
Sourcepub fn new(first_state: P1::PartialState) -> Self
pub fn new(first_state: P1::PartialState) -> Self
Create a new then lazy parser state.
Trait Implementations§
Source§impl<P1: Parser, P2: Parser> Default for ThenLazyParserState<P1, P2>where
P1::PartialState: Default,
impl<P1: Parser, P2: Parser> Default for ThenLazyParserState<P1, P2>where
P1::PartialState: Default,
Source§impl<P1: PartialEq + Parser, P2: PartialEq + Parser> PartialEq for ThenLazyParserState<P1, P2>
impl<P1: PartialEq + Parser, P2: PartialEq + Parser> PartialEq for ThenLazyParserState<P1, P2>
impl<P1: Eq + Parser, P2: Eq + Parser> Eq for ThenLazyParserState<P1, P2>
impl<P1: Parser, P2: Parser> StructuralPartialEq for ThenLazyParserState<P1, P2>
Auto Trait Implementations§
impl<P1, P2> Freeze for ThenLazyParserState<P1, P2>where
<P1 as Parser>::PartialState: Freeze,
<P1 as Parser>::Output: Freeze,
<P2 as Parser>::PartialState: Freeze,
impl<P1, P2> RefUnwindSafe for ThenLazyParserState<P1, P2>where
<P1 as Parser>::PartialState: RefUnwindSafe,
<P1 as Parser>::Output: RefUnwindSafe,
<P2 as Parser>::PartialState: RefUnwindSafe,
P2: RefUnwindSafe,
impl<P1, P2> Send for ThenLazyParserState<P1, P2>
impl<P1, P2> Sync for ThenLazyParserState<P1, P2>
impl<P1, P2> Unpin for ThenLazyParserState<P1, P2>where
<P1 as Parser>::PartialState: Unpin,
<P1 as Parser>::Output: Unpin,
<P2 as Parser>::PartialState: Unpin,
impl<P1, P2> UnwindSafe for ThenLazyParserState<P1, P2>where
<P1 as Parser>::PartialState: UnwindSafe,
<P1 as Parser>::Output: UnwindSafe,
<P2 as Parser>::PartialState: UnwindSafe,
P2: RefUnwindSafe,
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