orx-iterable 1.3.0

Defines and implements Iterable, Collection and CollectionMut traits to represent types that can be iterated over multiple times.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::obj_safe::IterableObj;
use crate::{transformations::CloningIterable, Iterable};
use std::boxed::Box;

impl<I> IterableObj for CloningIterable<I>
where
    I: Iterator + Clone,
{
    type Item = I::Item;

    fn boxed_iter(&self) -> Box<dyn Iterator<Item = Self::Item> + '_> {
        Box::new(<Self as Iterable>::iter(self))
    }
}