pub enum OwnedParseResult<P, R> {
Incomplete {
new_state: P,
required_next: Cow<'static, str>,
},
Finished {
result: R,
remaining: Vec<u8>,
},
}Expand description
A parser for a choice between two parsers.
Variants§
Incomplete
The parser is incomplete.
Fields
§
new_state: PThe new state of the parser.
Finished
The parser is finished.
Trait Implementations§
Source§impl<P: Clone, R: Clone> Clone for OwnedParseResult<P, R>
impl<P: Clone, R: Clone> Clone for OwnedParseResult<P, R>
Source§fn clone(&self) -> OwnedParseResult<P, R>
fn clone(&self) -> OwnedParseResult<P, R>
Returns a copy 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<P, R> From<ParseStatus<'_, P, R>> for OwnedParseResult<P, R>
impl<P, R> From<ParseStatus<'_, P, R>> for OwnedParseResult<P, R>
Source§fn from(result: ParseStatus<'_, P, R>) -> Self
fn from(result: ParseStatus<'_, P, R>) -> Self
Converts to this type from the input type.
impl<P: Eq, R: Eq> Eq for OwnedParseResult<P, R>
impl<P, R> StructuralPartialEq for OwnedParseResult<P, R>
Auto Trait Implementations§
impl<P, R> Freeze for OwnedParseResult<P, R>
impl<P, R> RefUnwindSafe for OwnedParseResult<P, R>where
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<P, R> Send for OwnedParseResult<P, R>
impl<P, R> Sync for OwnedParseResult<P, R>
impl<P, R> Unpin for OwnedParseResult<P, R>
impl<P, R> UnwindSafe for OwnedParseResult<P, R>where
P: UnwindSafe,
R: 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