subenum 1.1.1

A proc-macro to create subsets of enums, that can be converted to and from.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::boxed::Box;

pub trait BoxedIter {
    type Item;
    fn boxed(self) -> Box<dyn Iterator<Item = Self::Item>>;
}

impl<I: Iterator<Item = T> + 'static, T> BoxedIter for I {
    type Item = T;
    fn boxed(self) -> Box<dyn Iterator<Item = Self::Item>> {
        Box::new(self)
    }
}