[−][src]Struct lib_ruby_parser::source::Range
Fields
begin_pos: usize
end_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
Auto Trait Implementations
impl RefUnwindSafe for Range
[src]
impl Send for Range
[src]
impl Sync for Range
[src]
impl Unpin for Range
[src]
impl UnwindSafe for Range
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,