Trait neure::re::Regex

source ·
pub trait Regex<C> {
    type Ret;

    // Required method
    fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>;

    // Provided method
    fn parse(&self, ctx: &mut C) -> bool { ... }
}

Required Associated Types§

Required Methods§

source

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

Provided Methods§

source

fn parse(&self, ctx: &mut C) -> bool

Trait Implementations§

source§

impl<'a, C, O> Ctor<'a, C, O, O> for Box<dyn Regex<C, Ret = Span>>where C: Context<'a> + Match<C>,

source§

fn constrct<H, A>(&self, ctx: &mut C, handler: &mut H) -> Result<O, Error>where H: Handler<A, Out = O, Error = Error>, A: Extract<'a, C, Span, Out<'a> = A, Error = Error>,

source§

impl<'a, Ret, C> Regex<C> for Box<dyn Regex<C, Ret = Ret>>where C: Context<'a> + Match<C>,

§

type Ret = Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

fn parse(&self, ctx: &mut C) -> bool

Implementations on Foreign Types§

source§

impl<'a, P, C> Regex<C> for Arc<P>where P: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, C> Regex<C> for &Vec<u8>where C: Context<'a, Orig = [u8]> + Match<C>,

§

type Ret = Span

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, C> Regex<C> for &Stringwhere C: Context<'a, Orig = str> + Match<C>,

§

type Ret = Span

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, P, C> Regex<C> for Cell<P>where P: Regex<C> + Copy, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, P, C> Regex<C> for Rc<P>where P: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, const N: usize, C> Regex<C> for [u8; N]where C: Context<'a, Orig = [u8]> + Match<C>,

§

type Ret = Span

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, P, C> Regex<C> for Option<P>where P: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, Ret, C> Regex<C> for Arc<dyn Regex<C, Ret = Ret>>where C: Context<'a> + Match<C>,

§

type Ret = Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, P, C> Regex<C> for RefCell<P>where P: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, C> Regex<C> for &strwhere C: Context<'a, Orig = str> + Match<C>,

§

type Ret = Span

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, const N: usize, C> Regex<C> for &[u8; N]where C: Context<'a, Orig = [u8]> + Match<C>,

§

type Ret = Span

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, C> Regex<C> for Stringwhere C: Context<'a, Orig = str> + Match<C>,

§

type Ret = Span

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, P, C> Regex<C> for Mutex<P>where P: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, C> Regex<C> for &[u8]where C: Context<'a, Orig = [u8]> + Match<C>,

§

type Ret = Span

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, Ret, C> Regex<C> for Rc<dyn Regex<C, Ret = Ret>>where C: Context<'a> + Match<C>,

§

type Ret = Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, C> Regex<C> for Vec<u8>where C: Context<'a, Orig = [u8]> + Match<C>,

§

type Ret = Span

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

source§

impl<'a, Ret, C> Regex<C> for Box<dyn Regex<C, Ret = Ret>>where C: Context<'a> + Match<C>,

§

type Ret = Ret

source§

fn try_parse(&self, ctx: &mut C) -> Result<Self::Ret, Error>

Implementors§

source§

impl<'a, 'b, C> Regex<C> for LitString<'b>where C: Context<'a, Orig = str>,

§

type Ret = Span

source§

impl<'a, 'b, C, T> Regex<C> for LitSlice<'b, T>where T: PartialOrd + 'a, C: Context<'a, Orig = [T]>,

§

type Ret = Span

source§

impl<'a, 'b, const N: usize, C, K, V> Regex<C> for PairSlice<'b, N, K, V>where K: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <K as Regex<C>>::Ret

source§

impl<'a, 'b, const N: usize, C, T> Regex<C> for Slice<'b, N, T>where T: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <T as Regex<C>>::Ret

source§

impl<'a, C> Regex<C> for AnchorEndwhere C: Context<'a>,

§

type Ret = Span

source§

impl<'a, C> Regex<C> for AnchorStartwhere C: Context<'a>,

§

type Ret = Span

source§

impl<'a, C> Regex<C> for Consumewhere C: Context<'a>,

§

type Ret = Span

source§

impl<'a, C> Regex<C> for ConsumeAllwhere C: Context<'a>,

§

type Ret = Span

source§

impl<'a, C, K, V> Regex<C> for PairVector<K, V>where K: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <K as Regex<C>>::Ret

source§

impl<'a, C, L, I, R> Regex<C> for IfThen<C, L, I, R>where I: Regex<C, Ret = Span>, L: Regex<C, Ret = Span>, R: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <L as Regex<C>>::Ret

source§

impl<'a, C, L, R> Regex<C> for LongestTokenMatch<C, L, R>where L: Regex<C, Ret = Span>, R: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <L as Regex<C>>::Ret

source§

impl<'a, C, L, R> Regex<C> for Or<C, L, R>where L: Regex<C, Ret = Span>, R: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <L as Regex<C>>::Ret

source§

impl<'a, C, L, R> Regex<C> for Then<C, L, R>where L: Regex<C, Ret = Span>, R: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <L as Regex<C>>::Ret

source§

impl<'a, C, L, R, P> Regex<C> for Quote<C, P, L, R>where L: Regex<C, Ret = Span>, R: Regex<C, Ret = Span>, P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, L, S, R> Regex<C> for SepOnce<C, L, S, R>where S: Regex<C, Ret = Span>, L: Regex<C, Ret = Span>, R: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = Span

source§

impl<'a, C, P> Regex<C> for OptionPat<C, P>where P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, P> Regex<C> for Pattern<C, P>where P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, P> Regex<C> for Repeat<C, P>where P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = Span

source§

impl<'a, C, P, F> Regex<C> for DynamicCreateCtorThen<C, P, F>where P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, P, F, O> Regex<C> for Map<C, P, F, O>where P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, P, F, T> Regex<C> for DynamicCreateRegexThen<C, P, F>where P: Regex<C, Ret = Span>, T: Regex<C, Ret = Span>, C: Context<'a> + Match<C>, F: Fn(&Span) -> Result<T, Error>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, P, I, E> Regex<C> for IfRegex<C, P, I, E>where P: Regex<C, Ret = Span>, E: Regex<C, Ret = Span>, C: Context<'a> + Match<C>, I: Fn(&C) -> Result<bool, Error>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, P, O, V> Regex<C> for Collect<C, P, O, V>where P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, P, T> Regex<C> for Pad<C, P, T>where T: Regex<C, Ret = Span>, P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, P, T> Regex<C> for Padded<C, P, T>where T: Regex<C, Ret = Span>, P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = <P as Regex<C>>::Ret

source§

impl<'a, C, R> Regex<C> for DynamicCtor<'a, C, R>

§

type Ret = Span

source§

impl<'a, C, R> Regex<C> for DynamicRegex<'a, C, R>

§

type Ret = R

source§

impl<'a, C, R> Regex<C> for NullRegex<R>where R: Ret, C: Context<'a>,

§

type Ret = R

source§

impl<'a, C, S, P> Regex<C> for Separate<C, P, S>where S: Regex<C, Ret = Span>, P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = Span

source§

impl<'a, C, S, P, O, V> Regex<C> for SepCollect<C, P, S, O, V>where S: Regex<C, Ret = Span>, P: Regex<C, Ret = Span>, C: Context<'a> + Match<C>,

§

type Ret = Span

source§

impl<'a, C, T> Regex<C> for Vector<T>where T: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <T as Regex<C>>::Ret

source§

impl<'a, C, T> Regex<C> for RegexNot<T>where T: Regex<C>, <T as Regex<C>>::Ret: Ret, C: Context<'a> + Match<C>,

§

type Ret = <T as Regex<C>>::Ret

source§

impl<'a, L, R, C, I> Regex<C> for NeureThen<C, L, R, C::Item, I>where C: Context<'a> + 'a, L: Neu<C::Item>, R: Neu<C::Item>, I: NeuCond<'a, C>,

§

type Ret = Span

source§

impl<'a, U, C, I> Regex<C> for NeureOne<C, U, C::Item, I>where C: Context<'a> + 'a, U: Neu<C::Item>, I: NeuCond<'a, C>,

§

type Ret = Span

source§

impl<'a, U, C, I> Regex<C> for NeureOneMore<C, U, C::Item, I>where C: Context<'a> + 'a, U: Neu<C::Item>, I: NeuCond<'a, C>,

§

type Ret = Span

source§

impl<'a, U, C, I> Regex<C> for NeureRepeatRange<C, U, I>where U: Neu<C::Item>, I: NeuCond<'a, C>, C: Context<'a> + 'a,

§

type Ret = Span

source§

impl<'a, U, C, I> Regex<C> for NeureZeroMore<C, U, C::Item, I>where C: Context<'a> + 'a, U: Neu<C::Item>, I: NeuCond<'a, C>,

§

type Ret = Span

source§

impl<'a, U, C, I> Regex<C> for NeureZeroOne<C, U, C::Item, I>where C: Context<'a> + 'a, U: Neu<C::Item>, I: NeuCond<'a, C>,

§

type Ret = Span

source§

impl<'a, const M: usize, const N: usize, U, C, I> Regex<C> for NeureRepeat<M, N, C, U, I>where U: Neu<C::Item>, I: NeuCond<'a, C>, C: Context<'a> + 'a,

§

type Ret = Span

source§

impl<'a, const N: usize, C, K, V> Regex<C> for PairArray<N, K, V>where K: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <K as Regex<C>>::Ret

source§

impl<'a, const N: usize, C, T> Regex<C> for Array<N, T>where T: Regex<C>, C: Context<'a> + Match<C>,

§

type Ret = <T as Regex<C>>::Ret

source§

impl<C, F, R> Regex<C> for Fwhere F: Fn(&mut C) -> Result<R, Error>,

§

type Ret = R

source§

impl<C, T> Regex<C> for BoxedCtor<C, T>where T: Regex<C>,

§

type Ret = <T as Regex<C>>::Ret

source§

impl<C, T> Regex<C> for BoxedRegex<C, T>where T: Regex<C>,

§

type Ret = <T as Regex<C>>::Ret