pub struct PartialParseResult<Parsed, Error> { /* private fields */ }Expand description
Result of a parsing process that may or may not be complete.
Implementations§
Source§impl<Parsed, Error> PartialParseResult<Parsed, Error>
impl<Parsed, Error> PartialParseResult<Parsed, Error>
Sourcepub fn new_complete(parsed: Parsed) -> Self
pub fn new_complete(parsed: Parsed) -> Self
Create a complete parse result.
Sourcepub fn new_partial(parsed: Parsed, error: Error) -> Self
pub fn new_partial(parsed: Parsed, error: Error) -> Self
Create partial parse result.
Sourcepub fn try_into_complete(self) -> Result<Parsed, Error>
pub fn try_into_complete(self) -> Result<Parsed, Error>
Return an Ok if there was no error.
Otherwise, return an Err.
Sourcepub fn into_partial(self) -> (Parsed, Option<Error>)
pub fn into_partial(self) -> (Parsed, Option<Error>)
Return both the parsed object and the error regardless of whether there was an error.
Trait Implementations§
Source§impl<Parsed: Clone, Error: Clone> Clone for PartialParseResult<Parsed, Error>
impl<Parsed: Clone, Error: Clone> Clone for PartialParseResult<Parsed, Error>
Source§fn clone(&self) -> PartialParseResult<Parsed, Error>
fn clone(&self) -> PartialParseResult<Parsed, Error>
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<Parsed, Error> From<(Parsed, Option<Error>)> for PartialParseResult<Parsed, Error>
impl<Parsed, Error> From<(Parsed, Option<Error>)> for PartialParseResult<Parsed, Error>
Source§impl<Parsed, Error> From<PartialParseResult<Parsed, Error>> for (Parsed, Option<Error>)
impl<Parsed, Error> From<PartialParseResult<Parsed, Error>> for (Parsed, Option<Error>)
Source§fn from(value: PartialParseResult<Parsed, Error>) -> Self
fn from(value: PartialParseResult<Parsed, Error>) -> Self
Converts to this type from the input type.
Source§impl<Parsed, Error> From<PartialParseResult<Parsed, Error>> for Result<Parsed, Error>
impl<Parsed, Error> From<PartialParseResult<Parsed, Error>> for Result<Parsed, Error>
Source§fn from(value: PartialParseResult<Parsed, Error>) -> Self
fn from(value: PartialParseResult<Parsed, Error>) -> Self
Converts to this type from the input type.
impl<Parsed: Copy, Error: Copy> Copy for PartialParseResult<Parsed, Error>
Auto Trait Implementations§
impl<Parsed, Error> Freeze for PartialParseResult<Parsed, Error>
impl<Parsed, Error> RefUnwindSafe for PartialParseResult<Parsed, Error>where
Parsed: RefUnwindSafe,
Error: RefUnwindSafe,
impl<Parsed, Error> Send for PartialParseResult<Parsed, Error>
impl<Parsed, Error> Sync for PartialParseResult<Parsed, Error>
impl<Parsed, Error> Unpin for PartialParseResult<Parsed, Error>
impl<Parsed, Error> UnwindSafe for PartialParseResult<Parsed, Error>where
Parsed: UnwindSafe,
Error: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<X> Pipe for X
impl<X> Pipe for X
Source§fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
Source§fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
Source§fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read moreSource§fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read moreSource§fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Target = Param>. Read moreSource§fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Target = Param>. Read moreSource§fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Borrow<Param>. Read moreSource§fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Return
fn pipe_borrow_mut<'a, Param, Return, Function>( &'a mut self, f: Function, ) -> Return
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait BorrowMut<Param>. Read more