LiteralKind in regex_syntax::ast - Rust (original) (raw)

pub enum LiteralKind {
    Verbatim,
    Meta,
    Superfluous,
    Octal,
    HexFixed(HexLiteralKind),
    HexBrace(HexLiteralKind),
    Special(SpecialLiteralKind),
}

Expand description

The kind of a single literal expression.

§

The literal is written verbatim, e.g., a or .

§

The literal is written as an escape because it is otherwise a special regex meta character, e.g., \* or \[.

§

The literal is written as an escape despite the fact that the escape is unnecessary, e.g., \% or \/.

§

The literal is written as an octal escape, e.g., \141.

§

The literal is written as a hex code with a fixed number of digits depending on the type of the escape, e.g., \x61 or \u0061 or\U00000061.

§

The literal is written as a hex code with a bracketed number of digits. The only restriction is that the bracketed hex code must refer to a valid Unicode scalar value.

§

The literal is written as a specially recognized escape, e.g., \for \n.

Source§

Source§

Generate an arbitrary value of Self from the given unstructured data. Read more

Source§

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more

Source§

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more

Source§

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more

Source§

Source§

Source§

Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Source§

Source§

§

§

§

§

§

§