Struct esparse::ast::Span [] [src]

pub struct Span<'f> {
    pub file_name: &'f str,
    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>.

The (inclusive) starting location.

The (exclusive) ending location.

Methods

impl<'f> Span<'f>
[src]

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

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

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

Trait Implementations

impl<'f> Debug for Span<'f>
[src]

Formats the value using the given formatter.

impl<'f> Clone for Span<'f>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'f> Copy for Span<'f>
[src]

impl<'f> PartialEq for Span<'f>
[src]

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

This method tests for !=.

impl<'f> Eq for Span<'f>
[src]

impl<'f> Hash for Span<'f>
[src]

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

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