[][src]Trait jsonc_parser::common::Ranged

pub trait Ranged {
    fn range(&self) -> &Range;

    fn start(&self) -> usize { ... }
fn start_line(&self) -> usize { ... }
fn end(&self) -> usize { ... }
fn end_line(&self) -> usize { ... }
fn text<'a>(&self, text: &'a str) -> &'a str { ... }
fn start_position(&self) -> Position { ... }
fn end_position(&self) -> Position { ... } }

Represents an object that has a range in the text.

Required methods

fn range(&self) -> &Range[]

Gets the range.

Provided methods

fn start(&self) -> usize[]

Gets the index of the first character in the text.

fn start_line(&self) -> usize[]

Gets the line number of the start position in the text.

fn end(&self) -> usize[]

Gets the index after the last character in the text.

fn end_line(&self) -> usize[]

Gets the line number of the end position in the text.

fn text<'a>(&self, text: &'a str) -> &'a str[]

Gets the text from the provided string.

fn start_position(&self) -> Position[]

Gets the start position.

fn end_position(&self) -> Position[]

Gets the end position.

Implementors