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]

[src]

Create a new span with the given positions.

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Span
[src]

impl Eq for Span
[src]

impl PartialEq for Span
[src]

[src]

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

[src]

This method tests for !=.

impl Debug for Span
[src]

[src]

Formats the value using the given formatter. Read more

impl Ord for Span
[src]

[src]

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

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for Span
[src]

[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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