Struct esparse::ast::SpanT [] [src]

pub struct SpanT<F> {
    pub file_name: F,
    pub start: Loc,
    pub end: Loc,
}

A region of source code.

A pair of locations, representing a half-open range, and a file name, identifying the source code in which this region appears.

Fields

The name of the source code.

Often a file name, but can be an arbitrary string like <input> or even any other type.

The (inclusive) starting location.

The (exclusive) ending location.

Methods

impl<F> SpanT<F>
[src]

[src]

Creates a new SpanT with the given file name and locations.

[src]

Creates an empty SpanT at the given location, with the given file name.

[src]

Creates an empty SpanT with the given file name, pointing to the first position in the file.

Trait Implementations

impl<F: Debug> Debug for SpanT<F>
[src]

[src]

Formats the value using the given formatter.

impl<F: Clone> Clone for SpanT<F>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F: Copy> Copy for SpanT<F>
[src]

impl<F: PartialEq> PartialEq for SpanT<F>
[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<F: Eq> Eq for SpanT<F>
[src]

impl<F: Hash> Hash for SpanT<F>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<F: Display> Display for SpanT<F>
[src]

[src]

Formats the value using the given formatter. Read more