[][src]Struct reinda_core::template::FragmentSpans

pub struct FragmentSpans<'a> { /* fields omitted */ }

An iterator over the spans of all template fragments in input, in order.

The iterator's item is the span (Range<usize>) of the fragment. The span excludes the fragment start and end token, but includes potential excess whitespace. Example:

input:    b"a{{: kk   :}}b"
indices:    0123456789012

For that input, one span would be yielded by the iterator: 5..9 (input[5..9] is "kk ").

Implementations

impl<'a> FragmentSpans<'a>[src]

pub fn new(input: &'a [u8]) -> Self[src]

Trait Implementations

impl Iterator for FragmentSpans<'_>[src]

type Item = Range<usize>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> RefUnwindSafe for FragmentSpans<'a>[src]

impl<'a> Send for FragmentSpans<'a>[src]

impl<'a> Sync for FragmentSpans<'a>[src]

impl<'a> Unpin for FragmentSpans<'a>[src]

impl<'a> UnwindSafe for FragmentSpans<'a>[src]

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<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, 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.