armour 0.30.27

DDL and serialization for key-value storage
Documentation
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>);

    /// only for new items
    fn batch_update(&self, items: &[Entry<Item>]) {
        for item in items {
            self.update(&item.key, None, Some(&item.val));
        }
    }
}