Struct lip::End

source ·
pub struct End<P>(_);

Trait Implementations§

source§

impl<P: Clone> Clone for End<P>

source§

fn clone(&self) -> End<P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, P> Parser<'a> for End<P>where P: Parser<'a>,

§

type Output = <P as Parser<'a>>::Output

§

type State = <P as Parser<'a>>::State

source§

fn parse( &mut self, input: &'a str, location: Location, state: Self::State ) -> ParseResult<'a, Self::Output, Self::State>

Parse a given input, starting at a given location and state.
source§

fn run( &mut self, input: &'a str, state: Self::State ) -> ParseResult<'a, Self::Output, Self::State>

Run the parser on a given input, starting at the first character. Read more
source§

fn map<F, NewOutput: 'a>(self, map_fn: F) -> Map<Self, F>where Self: Sized + 'a, F: Fn(Self::Output) -> NewOutput + 'a,

Map the output to a new output if parse succeeds. Otherwise, return error as usual. Read more
source§

fn map_with_state<F, NewOutput: 'a>(self, map_fn: F) -> MapWithState<Self, F>where Self: Sized + 'a, F: Fn(Self::Output, Self::State) -> NewOutput + 'a,

The map function is supplied both the output and the state of the parser. Otherwise, return error as usual. Read more
source§

fn map_err<F>(self, map_fn: F) -> MapErr<Self, F>where Self: Sized + 'a, F: Fn(String) -> String,

Map the error message to a new message if parse fails. Otherwise, return output as usual. Read more
source§

fn and_then<F, P2, B>(self, f: F) -> AndThen<Self, F>where Self: Sized + 'a, P2: Parser<'a, Output = B>, F: Fn(Self::Output) -> P2,

Returns a new parser which is given the current output if parse succeeds. Otherwise, return error as usual. Read more
source§

fn pred<F>(self, predicate: F, expecting: &'a str) -> Pred<'_, Self, F>where Self: Sized + 'a, F: Fn(&Self::Output) -> bool,

Judge if the output meets the requirement using a predicate function if the parse succeeds. Otherwise, return error as usual.
source§

fn ignore(self) -> Ignore<Self>where Self: Sized + 'a,

Ignore the parse output and return () (emtpy tuple)
source§

fn update_state<F>(self, f: F) -> UpdateState<Self, F>where Self: Sized + 'a, F: Fn(Self::Output, Self::State) -> Self::State,

Update the state given the new output and state of the parse if parse succeeds. Otherwise, return error as usual.
source§

fn update<B, F>(self, f: F) -> Update<Self, F>where Self: Sized + 'a, F: FnOnce(&'a str, Self::Output, Location, Self::State) -> ParseResult<'a, B, Self::State> + Clone,

Update the result of the parser if parse succeeds. Otherwise, return error as usual. Read more
source§

fn end(self) -> End<Self>where Self: Sized + 'a,

Check if you have reached the end of the input you are parsing. Read more
source§

fn skip<P2>(self, ignored_parser: P2) -> Skip<Self, P2>where Self: Sized + 'a, P2: Parser<'a>,

Skip values in a parser pipeline. Read more
source§

fn backtrackable(self) -> Backtrackable<Self>where Self: Sized + 'a,

source§

fn first_of_two<T2>(self) -> OneOfTwo<Self, T2>where Self: Sized + 'a, T2: Parser<'a, Output = Self::Output, State = Self::State>,

source§

fn second_of_two<T1>(self) -> OneOfTwo<T1, Self>where Self: Sized + 'a, T1: Parser<'a, Output = Self::Output, State = Self::State>,

source§

fn first_of_three<T2, T3>(self) -> OneOfThree<Self, T2, T3>where Self: Sized + 'a, T2: Parser<'a, Output = Self::Output, State = Self::State>, T3: Parser<'a, Output = Self::Output, State = Self::State>,

source§

fn second_of_three<T1, T3>(self) -> OneOfThree<T1, Self, T3>where Self: Sized + 'a, T1: Parser<'a, Output = Self::Output, State = Self::State>, T3: Parser<'a, Output = Self::Output, State = Self::State>,

source§

fn third_of_three<T1, T2>(self) -> OneOfThree<T1, T2, Self>where Self: Sized + 'a, T1: Parser<'a, Output = Self::Output, State = Self::State>, T2: Parser<'a, Output = Self::Output, State = Self::State>,

Auto Trait Implementations§

§

impl<P> RefUnwindSafe for End<P>where P: RefUnwindSafe,

§

impl<P> Send for End<P>where P: Send,

§

impl<P> Sync for End<P>where P: Sync,

§

impl<P> Unpin for End<P>where P: Unpin,

§

impl<P> UnwindSafe for End<P>where P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.