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

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 { ... }
fn width(&self) -> usize { ... } }

Represents an object that has a range in the text.

Required methods

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

Gets the range.

Loading content...

Provided methods

fn start(&self) -> usize[src]

Gets the index of the first character in the text.

fn start_line(&self) -> usize[src]

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

fn end(&self) -> usize[src]

Gets the index after the last character in the text.

fn end_line(&self) -> usize[src]

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

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

Gets the text from the provided string.

fn start_position(&self) -> Position[src]

Gets the start position.

fn end_position(&self) -> Position[src]

Gets the end position.

fn width(&self) -> usize[src]

Gets the end position minus the start of the range.

Loading content...

Implementors

impl Ranged for BooleanLit[src]

impl Ranged for NullKeyword[src]

impl Ranged for Position[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading content...