Struct luther::Span [] [src]

pub struct Span<T> { /* fields omitted */ }

Wraps a value with start and end Location's.

Methods

impl<T> Span<T>
[src]

[src]

Create a new Span for a given start and end Location and value.

[src]

Gets the start Location of the Span.

[src]

Gets the end Location of the Span.

[src]

Gets a reference to the value of the Span.

[src]

Extends the current Span to a new end Location.

[src]

Consumes the span, returning a (start, value, end) tuple.

This is the format expected for a lalrpop external lexer.

Trait Implementations

impl<T: Clone> Clone for Span<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

impl<T: Debug> Debug for Span<T>
[src]

[src]

Formats the value using the given formatter. Read more

impl From<(usize, char)> for Span<char>
[src]

[src]

Converts from a (pos, value) to a Span.

This conversion is designed to support the Item type of the iterator returned from the str::char_indicies() method. It assumes the pos is the starting position and that the value is encoded in utf8.

Auto Trait Implementations

impl<T> Send for Span<T> where
    T: Send

impl<T> Sync for Span<T> where
    T: Sync