pub enum ExtractorKind {
    InternalExtractor {
        template: Pattern,
    },
    ExternalExtractor {
        name: Sym,
        infallible: bool,
        pos: Pos,
    },
}
Expand description

The kind of an extractor for a term.

Variants

InternalExtractor

Fields

template: Pattern

This extractor’s pattern.

A term that defines an “extractor macro” in the LHS of a pattern. Its arguments take patterns and are simply substituted with the given patterns when used.

ExternalExtractor

Fields

name: Sym

The external name of the extractor function.

infallible: bool

Is the external extractor infallible?

pos: Pos

The position where this external extractor was declared.

A term defined solely by an external extractor function.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.