Struct ketos::lexer::Span [] [src]

pub struct Span {
    pub lo: BytePos,
    pub hi: BytePos,
}

Represents a beginning and end point within a body of text.

Fields

lo: BytePos

First byte of range

hi: BytePos

One byte past the end of range

Methods

impl Span
[src]

fn empty(pos: BytePos) -> Span

Returns an empty Span at the given offset.

fn one(pos: BytePos, ch: char) -> Span

Returns a Span spanning a single char.

fn byte(pos: BytePos) -> Span

Returns a Span spanning a single byte.

Trait Implementations

impl PartialEq for Span
[src]

fn eq(&self, __arg_0: &Span) -> bool

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

fn ne(&self, __arg_0: &Span) -> bool

This method tests for !=.

impl Eq for Span
[src]

impl Debug for Span
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for Span
[src]

fn clone(&self) -> Span

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Span
[src]