use super::{AllocatedStorage, IndexKey};
mod backing;
mod caller;
use super::dense_key_index::DenseKeyIndex;
pub use backing::UniqueIndexBacking;
pub use caller::{
CallerUniqueIndex, CallerUniqueIndexStorage, UniqueIndexStorageError, UniqueIndexStorageRefusal,
};
mod creation;
mod inconsistency;
mod insert;
mod lookup;
mod remove;
mod replace;
pub use creation::UniqueIndexCreationError;
pub use inconsistency::UniqueIndexInconsistency;
pub use insert::{PreparedUniqueIndexInsert, UniqueIndexInsertError, UniqueIndexInsertOutcome};
pub use lookup::{UniqueIndexLookupError, UniqueIndexLookupOutcome};
pub use remove::{PreparedUniqueIndexRemove, UniqueIndexRemoveError, UniqueIndexRemoveOutcome};
pub use replace::{PreparedUniqueIndexReplace, UniqueIndexReplaceError, UniqueIndexReplaceOutcome};
pub struct UniqueIndex<Key: IndexKey, Backing: UniqueIndexBacking<Key> = AllocatedStorage> {
maximum_keys: usize,
keys: Backing::Keys,
key_index: DenseKeyIndex<Backing::Buckets>,
}
#[cfg(test)]
mod tests;