[][src]Struct lib_ruby_parser::source::Range

pub struct Range {
    pub begin_pos: usize,
    pub end_pos: usize,
}

Fields

begin_pos: usizeend_pos: usize

Implementations

impl Range[src]

pub fn new(begin_pos: usize, end_pos: usize) -> Self[src]

pub fn validate(&self, input: &Input)[src]

pub fn begin(&self) -> Self[src]

pub fn end(&self) -> Self[src]

pub fn size(&self) -> usize[src]

pub fn to_range(&self) -> Range<usize>[src]

pub fn with_begin(&self, begin_pos: usize) -> Self[src]

pub fn with_end(&self, end_pos: usize) -> Self[src]

pub fn with(&self, begin_pos: usize, end_pos: usize) -> Self[src]

pub fn adjust_begin(&self, d: i32) -> Self[src]

pub fn adjust_end(&self, d: i32) -> Self[src]

pub fn resize(&self, new_size: usize) -> Self[src]

pub fn join(&self, other: &Self) -> Self[src]

pub fn is_empty(&self) -> bool[src]

pub fn begin_line_col(&self, input: &Input) -> Option<(usize, usize)>[src]

pub fn end_line_col(&self, input: &Input) -> Option<(usize, usize)>[src]

pub fn expand_to_line(&self, input: &Input) -> Option<(usize, Self)>[src]

pub fn source(&self, input: &Input) -> Option<String>[src]

Trait Implementations

impl Clone for Range[src]

impl Debug for Range[src]

impl PartialEq<Range> for Range[src]

Auto Trait Implementations

impl RefUnwindSafe for Range

impl Send for Range

impl Sync for Range

impl Unpin for Range

impl UnwindSafe for Range

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.