[−][src]Macro nom_locate::impl_input_iter
Implement nom::InputIter for a specific fragment type
Parameters
$fragment_type
- The LocatedSpan'sfragment
type$item
- The type of the item being iterated (a reference for fragments of type&[T]
).$raw_item
- The raw type of the item being iterating (dereferenced type of $item for&[T]
, otherwise same as$item
)$iter
- The iterator type foriter_indices()
$iter_elem
- The iterator type foriter_elements()
Example of use
NB: This example is an extract from the nom_locate source code.
ⓘThis example is not tested
#[macro_use] extern crate nom_locate; impl_input_iter!(&'a str, char, char, CharIndices<'a>, Chars<'a>); impl_input_iter!(&'a [u8], &'a u8, u8, Enumerate<Iter<'a, Self::RawItem>>, Iter<'a, Self::RawItem>);