Trait meap::parser::ParserOpt

source ·
pub trait ParserOpt: Parser<Item = Option<Self::ItemOpt>> {
    type ItemOpt;

    // Provided method
    fn map_opt<U, F: FnOnce(Self::ItemOpt) -> U>(
        self,
        f: F
    ) -> MapOpt<Self::ItemOpt, U, F, Self> { ... }
}

Required Associated Types§

Provided Methods§

source

fn map_opt<U, F: FnOnce(Self::ItemOpt) -> U>( self, f: F ) -> MapOpt<Self::ItemOpt, U, F, Self>

Implementors§

source§

impl<T> ParserOpt for SomeIf<T>

§

type ItemOpt = T

source§

impl<T, A: Arity, H: HasParam, N: NameType> ParserOpt for Arg<A, H, N>where Self: Parser<Item = Option<T>>,

§

type ItemOpt = T

source§

impl<T, U, F: FnOnce(T) -> Option<U>, PT: Parser<Item = T>> ParserOpt for Map<T, Option<U>, F, PT>

§

type ItemOpt = U

source§

impl<T, U, F: FnOnce(T) -> U, POT: ParserOpt<ItemOpt = T>> ParserOpt for MapOpt<T, U, F, POT>

§

type ItemOpt = U