Struct gluon_base::source::Lines
[−]
[src]
pub struct Lines { /* fields omitted */ }
Type which provides a bidirectional mapping between byte offsets and line and column locations for some source file
Methods
impl Lines
[src]
fn new(src: &str) -> Lines
Creates a mapping for src
fn line(&self, line_number: Line) -> Option<BytePos>
Returns the byte offset of the start of line_number
fn location(&self, byte: BytePos) -> Option<Location>
Returns the line and column location of byte
fn line_number_at_byte(&self, byte: BytePos) -> Line
Returns which line byte
points to
Trait Implementations
impl Clone for Lines
[src]
fn clone(&self) -> Lines
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