use crate::substrate::{self, DefaultMemoryImpl};
use ic_memory::RuntimeMemory;
pub use substrate::{Memory, Storable, storable, storable::Bound};
#[cfg(all(test, not(target_arch = "wasm32")))]
mod tests;
mod region;
pub use region::{BTreeMapRegion, RegionGrowError};
mod map;
pub use map::StableBTreeMap;
mod set;
pub use set::StableBTreeSet;
mod cell;
pub use cell::{BoundedCell, StableCell};
mod vector;
pub use vector::StableVec;
mod heap;
pub use heap::StableMinHeap;
mod log;
pub use log::StableLog;
pub type MapIter<'a, K, V, M = DefaultMemoryImpl> =
substrate::btreemap::Iter<'a, K, V, RuntimeMemory<M>>;
pub type SetIter<'a, K, M = DefaultMemoryImpl> = substrate::btreeset::Iter<'a, K, RuntimeMemory<M>>;
pub type LogIter<'a, T, M = DefaultMemoryImpl> =
substrate::log::Iter<'a, T, RuntimeMemory<M>, RuntimeMemory<M>>;
pub use substrate::log::WriteError as LogWriteError;