Struct TryMapWithSpan

Source
pub struct TryMapWithSpan<A, F, O, U>(/* private fields */);

Trait Implementations§

Source§

impl<I: InputType, O, E: ParserExtras<I>, U, F: Fn(O, Range<I::Offset>) -> Result<U, E::Error>, A: Parser<I, O, E>> Parser<I, U, E> for TryMapWithSpan<A, F, O, U>

Source§

fn check<'parse>(&self, input: Input<'parse, I, E>) -> IResult<'parse, I, E, ()>

Errors Read more
Source§

fn parse<'parse>(&self, input: Input<'parse, I, E>) -> IResult<'parse, I, E, U>

Errors Read more
Source§

fn parse_from<'parse>(&self, input: &'parse I) -> ParseResult<'parse, I, O, E>
where E: ParserExtras<I, Context = ()>,

Source§

fn or<P: Parser<I, O, E>>(self, other: P) -> Or<Self, P>
where Self: Sized,

Source§

fn map<U, F: Fn(O) -> U>(self, mapper: F) -> Map<Self, O, F, U>
where Self: Sized,

Transforms this parser’s output with the mapper function. The mapper function cannot return an error. If you want to, consider using Parser::try_map Read more
Source§

fn to<U>(self, value: U) -> To<Self, O, U>
where Self: Sized,

Source§

fn ignored(self) -> Ignored<Self, O>
where Self: Sized,

Source§

fn try_map<F: Fn(U) -> Result<U, E::Error>, U>( self, f: F, ) -> TryMap<Self, F, O, U>
where Self: Sized,

Source§

fn try_map_with_span<F: Fn(U, Range<I::Offset>) -> Result<U, E::Error>, U>( self, f: F, ) -> TryMapWithSpan<Self, F, O, U>
where Self: Sized,

Source§

fn filter<F: Fn(&O) -> bool>(self, f: F) -> FilterParser<Self, F, O>
where Self: Sized,

Source§

fn repeated(self) -> Repeated<Self, O, Vec<O>>
where Self: Sized,

Example Read more
Source§

fn repeated_custom<V: FromIterator<O>>(self) -> Repeated<Self, O, V>
where Self: Sized,

Source§

fn slice<'a>(self) -> Slice<'a, I, E, O, Self>
where I: SliceInput<'a>, Self: Sized,

Source§

fn then<O2, P: Parser<I, O2, E>>( self, other: P, ) -> Then<O, O2, Self, P, true, false>
where Self: Sized,

Source§

fn ignore_then<O2, P: Parser<I, O2, E>>( self, other: P, ) -> Then<O, O2, Self, P, false, true>
where Self: Sized,

Source§

fn then_ignore<O2, P: Parser<I, O2, E>>( self, other: P, ) -> Then<O, O2, Self, P, false, false>
where Self: Sized,

Source§

fn optional(self) -> Maybe<Self>
where Self: Sized,

Auto Trait Implementations§

§

impl<A, F, O, U> Freeze for TryMapWithSpan<A, F, O, U>
where A: Freeze, F: Freeze,

§

impl<A, F, O, U> RefUnwindSafe for TryMapWithSpan<A, F, O, U>

§

impl<A, F, O, U> Send for TryMapWithSpan<A, F, O, U>
where A: Send, F: Send, O: Send, U: Send,

§

impl<A, F, O, U> Sync for TryMapWithSpan<A, F, O, U>
where A: Sync, F: Sync, O: Sync, U: Sync,

§

impl<A, F, O, U> Unpin for TryMapWithSpan<A, F, O, U>
where A: Unpin, F: Unpin, O: Unpin, U: Unpin,

§

impl<A, F, O, U> UnwindSafe for TryMapWithSpan<A, F, O, U>

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> 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<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.