[][src]Struct liquid_compiler::TagTokenIter

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

An iterator over TagTokens that is aware of their position in the file.

The awareness of the position allows more precise error messages.

Methods

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

pub fn raise_error(&mut self, error_msg: &str) -> Error[src]

Creates an error with the given message pointing at the current position of the iterator.

pub fn expect_next(&mut self, error_msg: &str) -> Result<TagToken<'a>>[src]

Returns the next tag token or raises an error if there is none.

pub fn expect_nothing(&mut self) -> Result<()>[src]

Returns Ok if the iterator is empty, an error otherwise

Trait Implementations

impl<'a> Iterator for TagTokenIter<'a>[src]

type Item = TagToken<'a>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for TagTokenIter<'a>

impl<'a> !Send for TagTokenIter<'a>

impl<'a> !Sync for TagTokenIter<'a>

impl<'a> Unpin for TagTokenIter<'a>

impl<'a> !UnwindSafe for TagTokenIter<'a>

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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> Itertools for T where
    T: Iterator + ?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.