Skip to main content

impl_with_iterator

Macro impl_with_iterator 

Source
macro_rules! impl_with_iterator {
    ($inner:ty) => { ... };
}
Expand description

Implements TypeSet for WithIterator<$inner> by delegating scalar behavior to the concrete inner type set and swapping in a real iterator type.

A generic impl<T: TypeSet> TypeSet for WithIterator<T> is not possible: the trait’s Integer: LoadStore<Self> bounds can only be discharged for a concrete inner type set (otherwise the trait solver cycles through the blanket LoadStore impls). Invoke this macro to enable iterators for a custom type set whose iterator type is NoIterator.