Added `Iter<"re, "a, T>`: An iterator over a `Populator<"a, T>`, or a slice of elements in that populator. The iterator yields `Ref<"re, "a, T>`, which can be used to insert into the populator or inspect its set-status.
@ -183,11 +183,20 @@ impl<'a, T> Iterator for IntoIter<'a, T>
impl<'a,T>FusedIteratorforIntoIter<'a,T>{}
impl<'a,T>ExactSizeIteratorforIntoIter<'a,T>{}
/// A reference iterator for a full `Populator<'re, T>`.
#[derive(Debug)]
structFullIterRef<'a,T>(std::slice::Iter<'a,T>);
//struct PartialIterRef<'a, T>(&) //XXX: This probably isn't possible unless it takes an exclusive reference of Populator<'a, T>. Having to pass 'a around really sucks hey.
/// A non-mutable reference to an item in `Populator<'a, T>`, inserted or not.
#[derive(Debug)]// PartialEq, PartialOrd ///XXX: TODO: Should this be Clone (and maybe even Copy)? Check OwnedRef below...
pubstructRef<'re,'a,T: 'a>
{
pub(super)pop: &'rePopulator<'a,T>,
pub(super)idx: usize,
pub(crate)pop: &'rePopulator<'a,T>,
pub(crate)idx: usize,
//TODO: Maybe add inserted bool, or state representing if this Ref has made a change to the populator. The value will be loaded on creation of the Ref, and will be used as a cached version of `completes[idx].load()`
//TODO: OR: Hold a reference to the actual AtomicBool at `idx` itself?
pub(super)inserted: &'reAtomicBool
pub(crate)inserted: &'reAtomicBool
}
/// A mutable reference to an item in `Populator<'a, T>`, inserted or not.
#[derive(Debug, Clone)]// PartialEq, PartialOrd //XXX: TODO: Should this actually be `Clone`? Ref isn't, because its supposed to be a single reference. But since this is arc'd?