pub trait Extract<'a>: Sized {
    type Output;

    // Required methods
    fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>;
    fn match_extract(self, match_: &Match<'a, '_>) -> Result<Self::Output, ()>;
}

Required Associated Types§

Required Methods§

source

fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>

source

fn match_extract(self, match_: &Match<'a, '_>) -> Result<Self::Output, ()>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, A: Extract<'a>, B: Extract<'a>, C: Extract<'a>, D: Extract<'a>, E: Extract<'a>, F: Extract<'a>, G: Extract<'a>, H: Extract<'a>> Extract<'a> for (A, B, C, D, E, F, G, H)

§

type Output = (<A as Extract<'a>>::Output, <B as Extract<'a>>::Output, <C as Extract<'a>>::Output, <D as Extract<'a>>::Output, <E as Extract<'a>>::Output, <F as Extract<'a>>::Output, <G as Extract<'a>>::Output, <H as Extract<'a>>::Output)

source§

fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>

source§

fn match_extract(self, found: &Match<'a, '_>) -> Result<Self::Output, ()>

source§

impl<'a, B: Extract<'a>, C: Extract<'a>, D: Extract<'a>, E: Extract<'a>, F: Extract<'a>, G: Extract<'a>, H: Extract<'a>> Extract<'a> for (B, C, D, E, F, G, H)

§

type Output = (<B as Extract<'a>>::Output, <C as Extract<'a>>::Output, <D as Extract<'a>>::Output, <E as Extract<'a>>::Output, <F as Extract<'a>>::Output, <G as Extract<'a>>::Output, <H as Extract<'a>>::Output)

source§

fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>

source§

fn match_extract(self, found: &Match<'a, '_>) -> Result<Self::Output, ()>

source§

impl<'a, C: Extract<'a>, D: Extract<'a>, E: Extract<'a>, F: Extract<'a>, G: Extract<'a>, H: Extract<'a>> Extract<'a> for (C, D, E, F, G, H)

§

type Output = (<C as Extract<'a>>::Output, <D as Extract<'a>>::Output, <E as Extract<'a>>::Output, <F as Extract<'a>>::Output, <G as Extract<'a>>::Output, <H as Extract<'a>>::Output)

source§

fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>

source§

fn match_extract(self, found: &Match<'a, '_>) -> Result<Self::Output, ()>

source§

impl<'a, D: Extract<'a>, E: Extract<'a>, F: Extract<'a>, G: Extract<'a>, H: Extract<'a>> Extract<'a> for (D, E, F, G, H)

§

type Output = (<D as Extract<'a>>::Output, <E as Extract<'a>>::Output, <F as Extract<'a>>::Output, <G as Extract<'a>>::Output, <H as Extract<'a>>::Output)

source§

fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>

source§

fn match_extract(self, found: &Match<'a, '_>) -> Result<Self::Output, ()>

source§

impl<'a, E: Extract<'a>, F: Extract<'a>, G: Extract<'a>, H: Extract<'a>> Extract<'a> for (E, F, G, H)

§

type Output = (<E as Extract<'a>>::Output, <F as Extract<'a>>::Output, <G as Extract<'a>>::Output, <H as Extract<'a>>::Output)

source§

fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>

source§

fn match_extract(self, found: &Match<'a, '_>) -> Result<Self::Output, ()>

source§

impl<'a, F: Extract<'a>, G: Extract<'a>, H: Extract<'a>> Extract<'a> for (F, G, H)

§

type Output = (<F as Extract<'a>>::Output, <G as Extract<'a>>::Output, <H as Extract<'a>>::Output)

source§

fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>

source§

fn match_extract(self, found: &Match<'a, '_>) -> Result<Self::Output, ()>

source§

impl<'a, G: Extract<'a>, H: Extract<'a>> Extract<'a> for (G, H)

§

type Output = (<G as Extract<'a>>::Output, <H as Extract<'a>>::Output)

source§

fn extract(self, found: &Found<'a, '_>) -> Result<Self::Output, ()>

source§

fn match_extract(self, found: &Match<'a, '_>) -> Result<Self::Output, ()>

Implementors§

source§

impl<'a> Extract<'a> for IdentAt

§

type Output = &'a SymbolRef

source§

impl<'a> Extract<'a> for SpanAt

§

type Output = Span<ByteIndex>

source§

impl<'a> Extract<'a> for TypeAt<'a>