[][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.

Loading content...

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.

Loading content...

Implementors

impl Ranged for Comment[src]

impl Ranged for ObjectPropName[src]

impl Ranged for Value[src]

impl Ranged for Array[src]

impl Ranged for BooleanLit[src]

impl Ranged for CommentBlock[src]

impl Ranged for CommentLine[src]

impl Ranged for NullKeyword[src]

impl Ranged for NumberLit[src]

impl Ranged for Object[src]

impl Ranged for ObjectProp[src]

impl Ranged for StringLit[src]

impl Ranged for WordLit[src]

impl Ranged for Position[src]

impl Ranged for TokenAndRange[src]

impl<'a> Ranged for Node<'a>[src]

Loading content...