Struct regex_syntax::ast::Span [] [src]

pub struct Span {
    pub start: Position,
    pub end: Position,
}

Span represents the position information of a single AST item.

All span positions are absolute byte offsets that can be used on the original regular expression that was parsed.

Fields

The start byte offset.

The end byte offset.

Methods

impl Span
[src]

Create a new span with the given positions.

Create a new span using the given position as the start and end.

Create a new span by replacing the starting the position with the one given.

Create a new span by replacing the ending the position with the one given.

Returns true if and only if this span occurs on a single line.

Returns true if and only if this span is empty. That is, it points to a single position in the concrete syntax of a regular expression.

Trait Implementations

impl Clone for Span
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Span
[src]

impl Eq for Span
[src]

impl PartialEq for Span
[src]

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

This method tests for !=.

impl Debug for Span
[src]

Formats the value using the given formatter. Read more

impl Ord for Span
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialOrd for Span
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

impl Send for Span

impl Sync for Span