Struct regex_syntax::ast::Literal [] [src]

pub struct Literal {
    pub span: Span,
    pub kind: LiteralKind,
    pub c: char,
}

A single literal expression.

A literal corresponds to a single Unicode scalar value. Literals may be represented in their literal form, e.g., a or in their escaped form, e.g., \x61.

Fields

The span of this literal.

The kind of this literal.

The Unicode scalar value corresponding to this literal.

Methods

impl Literal
[src]

If this literal was written as a \x hex escape, then this returns the corresponding byte value. Otherwise, this returns None.

Trait Implementations

impl Clone for Literal
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Literal
[src]

Formats the value using the given formatter. Read more

impl Eq for Literal
[src]

impl PartialEq for Literal
[src]

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

This method tests for !=.

Auto Trait Implementations

impl Send for Literal

impl Sync for Literal