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.
//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...
#[derive(Debug)]// PartialEq, PartialOrd ///XXX: TODO: Should this be Clone (and maybe even Copy)? Check OwnedRef below...
pubstructRef<'re,'a,T: 'a>
pubstructRef<'re,'a,T: 'a>
{
{
pub(super)pop: &'rePopulator<'a,T>,
pub(crate)pop: &'rePopulator<'a,T>,
pub(super)idx: usize,
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: 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?
//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?
#[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?