[][src]Struct ruby_parser::TrackedLocation

pub struct TrackedLocation<T, X> {
    pub metadata: X,
    // some fields omitted
}

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]

Trait Implementations

impl<T: AsBytes, X> AsBytes for TrackedLocation<T, X>[src]

impl<T: Clone, X: Clone> Clone for TrackedLocation<T, X>[src]

impl<'a, A: Compare<B>, B: Into<TrackedLocation<B, X>>, X> Compare<B> for TrackedLocation<A, X>[src]

impl<T: Debug, X: Debug> Debug for TrackedLocation<T, X>[src]

impl<T, X> Deref for TrackedLocation<T, X>[src]

type Target = T

The resulting type after dereferencing.

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]

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

impl<'a, T: FindSubstring<&'a str>, X> FindSubstring<&'a str> for TrackedLocation<T, X>[src]

impl<T: FindToken<Token>, Token, X> FindToken<Token> for TrackedLocation<T, X>[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

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]

impl<T, X> InputTakeAtPosition for TrackedLocation<T, X> where
    T: InputTakeAtPosition + InputLength + InputIter,
    Self: Slice<RangeFrom<usize>> + Slice<RangeTo<usize>> + Clone
[src]

type Item = <T as InputIter>::Item

the current input type is a sequence of that Item type. Read more

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?

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

impl<T, X> Send for TrackedLocation<T, X> where
    T: Send,
    X: Send

impl<T, X> Sync for TrackedLocation<T, X> where
    T: Sync,
    X: Sync

impl<T, X> Unpin for TrackedLocation<T, X> where
    T: Unpin,
    X: Unpin

impl<T, X> UnwindSafe for TrackedLocation<T, X> where
    T: UnwindSafe,
    X: UnwindSafe

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, O> Compare<O> for T where
    O: InputLength + InputIter<Item = u8> + InputTake,
    T: InputIter<Item = u8> + InputTake + UnspecializedInput + InputLength
[src]

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

impl<T> InputTakeAtPosition for T where
    T: InputLength + InputIter + InputTake + UnspecializedInput + Clone
[src]

type Item = <T as InputIter>::Item

the current input type is a sequence of that Item type. Read more

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

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?

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.