Struct moore_common::source::Span [] [src]

pub struct Span {
    pub source: Source,
    pub begin: usize,
    pub end: usize,
}

A span of locations within a source file, expressed as a half-open interval of bytes [begin,end).

Fields

Methods

impl Span
[src]

[src]

Create a new span from two byte offsets.

[src]

Create a new span that covers two spans, i.e. represents the smallest possible span that fully contains both input spans a and b.

[src]

Modify this range to also cover the entirety of the other range. The other range must lie in the same source as self.

[src]

Return the location just before the first character in this span.

[src]

Return the location just after the last character in this span.

[src]

Copy the portion of the source file in this span into an owned string.

[src]

Obtain an iterator over the extract of the source file describe by this span.

Trait Implementations

impl Copy for Span
[src]

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 PartialOrd for Span
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

impl Ord for Span
[src]

[src]

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

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

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 Eq for Span
[src]

impl Encodable for Span
[src]

[src]

Serialize a value using an Encoder.

impl Decodable for Span
[src]

[src]

Deserialize a value using a Decoder.

impl Debug for Span
[src]

[src]

Formats the value using the given formatter.