[−][src]Struct ruby_parser::TrackedLocation
Tracks location information and user-defined metadata for nom's source input.
Fields
metadata: X
Any user-defined metadata that should be tracked in addition to the location
Implementations
impl<T: AsBytes, X> TrackedLocation<T, X>
[src]
pub fn new_with_metadata(program: T, metadata: X) -> Self
[src]
pub fn offset(&self) -> usize
[src]
pub fn line(&self) -> usize
[src]
pub fn char(&self) -> usize
[src]
pub fn input(&self) -> &T
[src]
pub fn metadata(&self) -> &X
[src]
pub fn beginning_of_line(&self) -> bool
[src]
impl<T: AsBytes, X: Default> TrackedLocation<T, X>
[src]
pub fn new(program: T) -> Self
[src]
pub fn new_with_pos(program: T, offset: usize, line: usize, char: usize) -> Self
[src]
impl<T: AsBytes, X> TrackedLocation<T, X>
[src]
pub fn new_with_pos_and_meta(
program: T,
offset: usize,
line: usize,
char: usize,
metadata: X
) -> Self
[src]
program: T,
offset: usize,
line: usize,
char: usize,
metadata: X
) -> Self
Trait Implementations
impl<T: AsBytes, X> AsBytes for TrackedLocation<T, X>
[src]
impl<T: Clone, X: Clone> Clone for TrackedLocation<T, X>
[src]
fn clone(&self) -> TrackedLocation<T, X>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, A: Compare<B>, B: Into<TrackedLocation<B, X>>, X> Compare<B> for TrackedLocation<A, X>
[src]
fn compare(&self, other: B) -> CompareResult
[src]
fn compare_no_case(&self, other: B) -> CompareResult
[src]
impl<T: Debug, X: Debug> Debug for TrackedLocation<T, X>
[src]
impl<T, X> Deref for TrackedLocation<T, X>
[src]
impl<T: ToString, X> Display for TrackedLocation<T, X>
[src]
impl<T: Eq, X> Eq for TrackedLocation<T, X>
[src]
impl<'a, I, E, T, X> ExtendInto for TrackedLocation<T, X> where
E: Default + Extend<I>,
T: ExtendInto<Item = I, Extender = E>,
Self: Clone + IntoIterator<Item = I>,
[src]
E: Default + Extend<I>,
T: ExtendInto<Item = I, Extender = E>,
Self: Clone + IntoIterator<Item = I>,
type Item = I
the current input type is a sequence of that Item
type. Read more
type Extender = E
the type that will be produced
fn new_builder(&self) -> Self::Extender
[src]
fn extend_into(&self, acc: &mut Self::Extender)
[src]
impl<'a, T: FindSubstring<&'a str>, X> FindSubstring<&'a str> for TrackedLocation<T, X>
[src]
fn find_substring(&self, substr: &'a str) -> Option<usize>
[src]
impl<T: FindToken<Token>, Token, X> FindToken<Token> for TrackedLocation<T, X>
[src]
fn find_token(&self, token: Token) -> bool
[src]
impl<T: AsBytes, X: Default> From<T> for TrackedLocation<T, X>
[src]
impl<'a, X> InputIter for TrackedLocation<&'a str, X>
[src]
type Item = char
the current input type is a sequence of that Item
type. Read more
type Iter = CharIndices<'a>
an iterator over the input type, producing the item and its position for use with [Slice]. If we're iterating over &str
, the position corresponds to the byte index of the character Read more
type IterElem = Chars<'a>
an iterator over the input type, producing the item
fn iter_indices(&self) -> Self::Iter
[src]
fn iter_elements(&self) -> Self::IterElem
[src]
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(Self::Item) -> bool,
[src]
P: Fn(Self::Item) -> bool,
fn slice_index(&self, count: usize) -> Option<usize>
[src]
impl<T: InputLength, X> InputLength for TrackedLocation<T, X>
[src]
impl<T, X> InputTake for TrackedLocation<T, X> where
Self: Slice<RangeFrom<usize>> + Slice<RangeTo<usize>>,
[src]
Self: Slice<RangeFrom<usize>> + Slice<RangeTo<usize>>,
impl<T, X> InputTakeAtPosition for TrackedLocation<T, X> where
T: InputTakeAtPosition + InputLength + InputIter,
Self: Slice<RangeFrom<usize>> + Slice<RangeTo<usize>> + Clone,
[src]
T: InputTakeAtPosition + InputLength + InputIter,
Self: Slice<RangeFrom<usize>> + Slice<RangeTo<usize>> + Clone,
type Item = <T as InputIter>::Item
the current input type is a sequence of that Item
type. Read more
fn split_at_position_complete<P, E: ParseError<Self>>(
&self,
predicate: P
) -> IResult<Self, Self, E> where
P: Fn(Self::Item) -> bool,
[src]
&self,
predicate: P
) -> IResult<Self, Self, E> where
P: Fn(Self::Item) -> bool,
fn split_at_position<P, E: ParseError<Self>>(
&self,
predicate: P
) -> IResult<Self, Self, E> where
P: Fn(Self::Item) -> bool,
[src]
&self,
predicate: P
) -> IResult<Self, Self, E> where
P: Fn(Self::Item) -> bool,
fn split_at_position1<P, E: ParseError<Self>>(
&self,
predicate: P,
e: ErrorKind
) -> IResult<Self, Self, E> where
P: Fn(Self::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind
) -> IResult<Self, Self, E> where
P: Fn(Self::Item) -> bool,
fn split_at_position1_complete<P, E: ParseError<Self>>(
&self,
predicate: P,
e: ErrorKind
) -> IResult<Self, Self, E> where
P: Fn(Self::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind
) -> IResult<Self, Self, E> where
P: Fn(Self::Item) -> bool,
impl<'a, X> IntoIterator for TrackedLocation<&'a str, X>
[src]
type Item = char
The type of the elements being iterated over.
type IntoIter = Chars<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<T, X> Offset for TrackedLocation<T, X>
[src]
impl<R: FromStr, T: ParseTo<R>, X> ParseTo<R> for TrackedLocation<T, X>
[src]
impl<T: PartialEq, X> PartialEq<TrackedLocation<T, X>> for TrackedLocation<T, X>
[src]
impl<'a, X: Clone> Slice<Range<usize>> for TrackedLocation<&'a str, X>
[src]
impl<'a, X: Clone> Slice<RangeFrom<usize>> for TrackedLocation<&'a str, X>
[src]
impl<'a, T: Clone, X: Clone> Slice<RangeFull> for TrackedLocation<T, X>
[src]
impl<'a, X: Clone> Slice<RangeTo<usize>> for TrackedLocation<&'a str, X>
[src]
Auto Trait Implementations
impl<T, X> RefUnwindSafe for TrackedLocation<T, X> where
T: RefUnwindSafe,
X: RefUnwindSafe,
T: RefUnwindSafe,
X: RefUnwindSafe,
impl<T, X> Send for TrackedLocation<T, X> where
T: Send,
X: Send,
T: Send,
X: Send,
impl<T, X> Sync for TrackedLocation<T, X> where
T: Sync,
X: Sync,
T: Sync,
X: Sync,
impl<T, X> Unpin for TrackedLocation<T, X> where
T: Unpin,
X: Unpin,
T: Unpin,
X: Unpin,
impl<T, X> UnwindSafe for TrackedLocation<T, X> where
T: UnwindSafe,
X: UnwindSafe,
T: UnwindSafe,
X: UnwindSafe,
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, O> Compare<O> for T where
O: InputLength + InputIter<Item = u8> + InputTake,
T: InputIter<Item = u8> + InputTake + UnspecializedInput + InputLength,
[src]
O: InputLength + InputIter<Item = u8> + InputTake,
T: InputIter<Item = u8> + InputTake + UnspecializedInput + InputLength,
fn compare(&self, t: O) -> CompareResult
[src]
fn compare_no_case(&self, t: O) -> CompareResult
[src]
impl<T> From<T> for T
[src]
impl<T> InputTakeAtPosition for T where
T: InputLength + InputIter + InputTake + UnspecializedInput + Clone,
[src]
T: InputLength + InputIter + InputTake + UnspecializedInput + Clone,
type Item = <T as InputIter>::Item
the current input type is a sequence of that Item
type. Read more
fn split_at_position<P, E>(&self, predicate: P) -> Result<(T, T), Err<E>> where
E: ParseError<T>,
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
[src]
E: ParseError<T>,
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
fn split_at_position1<P, E>(
&self,
predicate: P,
e: ErrorKind
) -> Result<(T, T), Err<E>> where
E: ParseError<T>,
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind
) -> Result<(T, T), Err<E>> where
E: ParseError<T>,
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
fn split_at_position_complete<P, E>(
&self,
predicate: P
) -> Result<(T, T), Err<E>> where
E: ParseError<T>,
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P
) -> Result<(T, T), Err<E>> where
E: ParseError<T>,
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
fn split_at_position1_complete<P, E>(
&self,
predicate: P,
e: ErrorKind
) -> Result<(T, T), Err<E>> where
E: ParseError<T>,
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
[src]
&self,
predicate: P,
e: ErrorKind
) -> Result<(T, T), Err<E>> where
E: ParseError<T>,
P: Fn(<T as InputTakeAtPosition>::Item) -> bool,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,