Struct Upper

Source
pub struct Upper<I>(/* private fields */)
where
    I: Stream<Item = char>;

Trait Implementations§

Source§

impl<I> Clone for Upper<I>
where I: Stream<Item = char> + Clone,

Source§

fn clone(&self) -> Upper<I>

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<I> Parser for Upper<I>
where I: Stream<Item = char>,

Source§

type Input = I

A type implementing the Stream trait which is the specific type that is parsed.
Source§

type Output = <Expected<Satisfy<I, fn(char) -> bool>> as Parser>::Output

The type which is returned when the parsing is successful.
Source§

fn parse_lazy( &mut self, input: State<<Self as Parser>::Input>, ) -> ParseResult<<Self as Parser>::Output, <Self as Parser>::Input>

Specialized version of parse_state where the parser does not need to add an error to the ParseError when it does not consume any input before encountering the error. Instead the error can be added later through the add_error method
Source§

fn add_error(&mut self, errors: &mut ParseError<<Self::Input as Stream>::Item>)

Adds the first error that would normally be returned by this parser if it failed
Source§

fn parse( &mut self, input: Self::Input, ) -> Result<(Self::Output, Self::Input), ParseError<<Self::Input as Stream>::Item>>

Entrypoint of the parser Takes some input and tries to parse it returning a ParseResult
Source§

fn parse_state( &mut self, input: State<Self::Input>, ) -> ParseResult<Self::Output, Self::Input, <Self::Input as Stream>::Item>

Parses using the state input by calling Stream::uncons one or more times On success returns Ok((value, new_state)) on failure it returns Err(error)

Auto Trait Implementations§

§

impl<I> Freeze for Upper<I>

§

impl<I> RefUnwindSafe for Upper<I>
where I: RefUnwindSafe,

§

impl<I> Send for Upper<I>
where I: Send,

§

impl<I> Sync for Upper<I>
where I: Sync,

§

impl<I> Unpin for Upper<I>
where I: Unpin,

§

impl<I> UnwindSafe for Upper<I>
where I: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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<P> ParserExt for P
where P: Parser,

Source§

fn with<P2>(self, p: P2) -> With<Self, P2>
where P2: Parser<Input = Self::Input>,

Discards the value of the self parser and returns the value of p Fails if any of the parsers fails Read more
Source§

fn skip<P2>(self, p: P2) -> Skip<Self, P2>
where P2: Parser<Input = Self::Input>,

Discards the value of the p parser and returns the value of self Fails if any of the parsers fails Read more
Source§

fn and<P2>(self, p: P2) -> And<Self, P2>
where P2: Parser<Input = Self::Input>,

Parses with self followed by p Succeds if both parsers succed, otherwise fails Returns a tuple with both values on success Read more
Source§

fn or<P2>(self, p: P2) -> Or<Self, P2>
where P2: Parser<Input = Self::Input>,

Tries to parse using self and if it fails returns the result of parsing p Read more
Source§

fn then<N, F>(self, f: F) -> Then<Self, F>
where F: FnMut(Self::Output) -> N, N: Parser<Input = Self::Input>,

Parses using self and then passes the value to f which returns a parser used to parse the rest of the input Read more
Source§

fn map<F, B>(self, f: F) -> Map<Self, F>
where F: FnMut(Self::Output) -> B,

Uses f to map over the parsed value Read more
Source§

fn message<S>(self, msg: S) -> Message<Self>
where S: Into<Info<<Self::Input as Stream>::Item>>,

Parses with self and if it fails, adds the message msg to the error Read more
Source§

fn expected<S>(self, msg: S) -> Expected<Self>
where S: Into<Info<<Self::Input as Stream>::Item>>,

Parses with self and if it fails without consuming any input any expected errors are replaced by msg. msg is then used in error messages as “Expected msg”. Read more
Source§

fn and_then<F, O, E>(self, f: F) -> AndThen<Self, F>
where F: FnMut(Self::Output) -> Result<O, E>, E: Into<Error<<Self::Input as Stream>::Item>>,

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 ParseError Read more
Source§

fn iter(self, input: State<Self::Input>) -> Iter<Self>

Creates an iterator from a parser and a state. Can be used as an alternative to many when collecting directly into a FromIterator type is not desirable Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.