tablestg 0.4.28

Storage for database tables
Documentation
//! This crate is not yet reliable or stable!
//!
//! [Table] stores [Value]s which have a specific [DataType].

/// [Table] stores [Value]s which have a specific [DataType].
pub mod table;
pub use table::Table;

/// Generic [Value]s.
pub mod value;
pub use value::Value;

/// [DataType] - describes, encodes and decodes [Value]s.
pub mod datatype;
pub use datatype::DataType;
use datatype::{LazyItem, MSPX, SPX};

/// [PageSet] - keeps track of changed pages that need saving.
pub mod pageset;
use pageset::PData;
pub use pageset::PageSet;

/// [Store] - maps keys to variable size values (no size restriction) using 64 bit hash.
pub mod store;
pub use store::Store;
use store::{SData, StoreIter};

/// [VBuckMap] - maps keys to small variable size values using 64 bit hash. For possibly large values see [Store].
pub mod vbuckmap;
pub use vbuckmap::IdVKey;
use vbuckmap::{VBuckMap, VBuckMapInfo, VBuckMapIter, VKey};

// Remaining modules are private.

/// List of pages implemented as tree for [VBuckMap].
mod pagetree;

/// Bucket for [VBuckMap].
mod vbucket;
use vbucket::{Pos, Reader, Writer};

/// Standard page size ( for pagetree ).
const PAGE_SIZE: u64 = 3952;

// Basic data types.

pub use atom_file::{Arc, Data};

pub use pstd::localalloc::{Local, Perm};

/// `StringA<Local>`
pub type LString = pstd::StringA<Local>;
/// `VecA<T, Local>`
pub type LVec<T> = pstd::VecA<T, Local>;
/// `BoxA<T, Local>`
pub type LBox<T> = pstd::BoxA<T, Local>;
/// `RcA<T, Lpcal>`
pub type LRc<T> = pstd::RcA<T, Local>;

/// `StringA<Perm>`
pub type GString = pstd::StringA<Perm>;
/// `VecA<T, Perm>`
pub type GVec<T> = pstd::VecA<T, Perm>;
/// `BoxA<T, Perm>`
pub type GBox<T> = pstd::BoxA<T, Perm>;
/// `RcA<T, Perm>`
pub type GRc<T> = pstd::RcA<T, Perm>;

pub type HashSet<T> = std::collections::HashSet<T>;

mod test;