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