pub struct Then<P, F> { /* private fields */ }
Trait Implementations§
Source§impl<RDF, P, F, N> RDFNodeParse<RDF> for Then<P, F>
impl<RDF, P, F, N> RDFNodeParse<RDF> for Then<P, F>
Source§type Output = <N as RDFNodeParse<RDF>>::Output
type Output = <N as RDFNodeParse<RDF>>::Output
The type which is returned if the parser is successful.
Source§fn parse_impl(&mut self, rdf: &mut RDF) -> PResult<Self::Output>
fn parse_impl(&mut self, rdf: &mut RDF) -> PResult<Self::Output>
Parses the current focus node without modifying the state
fn by_ref(&mut self) -> ByRef<'_, Self>where
Self: Sized,
Source§fn and_then<F, O, E>(self, f: F) -> AndThen<Self, F>
fn and_then<F, O, E>(self, f: F) -> AndThen<Self, F>
Parses with
self
and applies f
on the result if self
parses successfully.
f
may optionally fail with an error which is automatically converted to a RDFParseError
. Read moreSource§fn and<P2>(self, parser: P2) -> (Self, P2)where
Self: Sized,
P2: RDFNodeParse<RDF>,
fn and<P2>(self, parser: P2) -> (Self, P2)where
Self: Sized,
P2: RDFNodeParse<RDF>,
Parses
self
followed by p
.
Succeeds if both parsers succeed, otherwise fails.
Returns a tuple with both values on success. Read moreSource§fn then<N, F>(self, f: F) -> Then<Self, F>
fn then<N, F>(self, f: F) -> Then<Self, F>
Parses using
self
and then passes the value to f
which returns a parser used to parse
the rest of the input.Source§fn then_ref<N, F>(self, f: F) -> ThenRef<Self, F>
fn then_ref<N, F>(self, f: F) -> ThenRef<Self, F>
Parses using
self
and then passes a reference to the value to f
which returns a parser used to parse
the rest of the input.Source§fn then_mut<N, F>(self, f: F) -> ThenMut<Self, F>
fn then_mut<N, F>(self, f: F) -> ThenMut<Self, F>
Parses using
self
and then passes a reference to the mutable value to f
which returns a parser used to parse
the rest of the input. Read moreSource§fn or<P2>(self, parser: P2) -> Or<Self, P2>
fn or<P2>(self, parser: P2) -> Or<Self, P2>
Returns a parser which attempts to parse using
self
. If self
fails then it attempts parser
. Read moreimpl<P: Copy, F: Copy> Copy for Then<P, F>
Auto Trait Implementations§
impl<P, F> Freeze for Then<P, F>
impl<P, F> RefUnwindSafe for Then<P, F>where
P: RefUnwindSafe,
F: RefUnwindSafe,
impl<P, F> Send for Then<P, F>
impl<P, F> Sync for Then<P, F>
impl<P, F> Unpin for Then<P, F>
impl<P, F> UnwindSafe for Then<P, F>where
P: UnwindSafe,
F: 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