Enum kalosm_sample::OwnedParseResult
source · 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
Fields
§
new_state: P
The new state of the parser.
The parser is incomplete.
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<ParseResult<'_, P, R>> for OwnedParseResult<P, R>
impl<P, R> From<ParseResult<'_, P, R>> for OwnedParseResult<P, R>
source§fn from(result: ParseResult<'_, P, R>) -> Self
fn from(result: ParseResult<'_, P, R>) -> Self
Converts to this type from the input type.
source§impl<P: PartialEq, R: PartialEq> PartialEq for OwnedParseResult<P, R>
impl<P: PartialEq, R: PartialEq> PartialEq for OwnedParseResult<P, R>
source§fn eq(&self, other: &OwnedParseResult<P, R>) -> bool
fn eq(&self, other: &OwnedParseResult<P, R>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<P: Eq, R: Eq> Eq for OwnedParseResult<P, R>
impl<P, R> StructuralPartialEq for OwnedParseResult<P, R>
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.