use crate::{Entry, Record};
pub mod btree;
#[cfg(feature = "id_vec")]
pub mod id_vec;
pub mod index;
#[cfg(feature = "value_indexes")]
pub mod value_indexes;
pub trait IndexUpdateCollection<Item>
where
Self: Sync + Send,
Item: Record,
{
fn update(&self, id: &Item::SelfId, old: Option<&Item>, new: Option<&Item>);
fn batch_update(&self, items: &[Entry<Item>]) {
for item in items {
self.update(&item.key, None, Some(&item.val));
}
}
}