Trait macro_tools::IterTrait

source ·
pub trait IterTrait<'a, T: 'a>
where Self: Iterator<Item = &'a T> + ExactSizeIterator<Item = &'a 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 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: 'a, I> IterTrait<'a, T> for I
where Self: Iterator<Item = &'a T> + ExactSizeIterator<Item = &'a T> + DoubleEndedIterator,