Trait macro_tools::IterTrait

source ·
pub trait IterTrait<'a, T>
where T: 'a, Self: Iterator<Item = T> + ExactSizeIterator<Item = T> + DoubleEndedIterator,
{ }
Expand description

Trait that encapsulates an iterator with specific characteristics, tailored for use with the syn crate.

The IterTrait trait is designed to represent iterators that may yield references to items (&'a T) within the syn crate. These iterators must also implement the ExactSizeIterator and DoubleEndedIterator traits. This combination ensures that the iterator can:

  • Provide an exact size hint (ExactSizeIterator),
  • Be traversed from both ends (DoubleEndedIterator).

Implementors§

source§

impl<'a, T, I> IterTrait<'a, T> for I
where T: 'a, Self: Iterator<Item = T> + ExactSizeIterator<Item = T> + DoubleEndedIterator,