Expand description
§vsdb_core
vsdb_core provides the low-level building blocks for vsdb, including the
storage layer, raw data structures, and common utilities. It is not
typically used directly by end-users, but forms the foundation of the vsdb
ecosystem.
§Storage backend
The storage engine is MMDB, a pure-Rust LSM-Tree engine.
§Read-only mode
Configure read-only access before any other VSDB API, then restore handles saved by a writable process:
use vsdb_core::{InstanceId, MapxRaw, VsdbOptions, vsdb_configure};
vsdb_configure(VsdbOptions::read_only("/srv/my-app/vsdb"))?;
let id: InstanceId = "40960000".parse()?;
let map = MapxRaw::from_meta(id)?;
assert!(map.namespace().is_read_only());The setting is one-shot and process-wide, including every namespace. Queries and in-memory WAL recovery do not change the database tree; creation and mutation are unavailable.
Re-exports§
pub use basic::mapx_raw::MapxRaw;pub use common::BatchTrait;pub use common::DEFAULT_NS_ID;pub use common::GB;pub use common::InstanceId;pub use common::KB;pub use common::MB;pub use common::Namespace;pub use common::NamespaceOpts;pub use common::NsId;pub use common::NsInfo;pub use common::OpenMode;pub use common::RawBytes;pub use common::RawKey;pub use common::RawValue;pub use common::VsdbOptions;pub use common::vsdb_configure;pub use common::vsdb_flush;pub use common::vsdb_get_base_dir;pub use common::vsdb_get_custom_dir;pub use common::vsdb_get_meta_dir;pub use common::vsdb_get_system_dir;pub use common::vsdb_meta_path;pub use common::vsdb_ns_close;pub use common::vsdb_ns_destroy;pub use common::vsdb_ns_list;pub use common::vsdb_ns_relocate;pub use common::vsdb_open_mode;pub use common::vsdb_set_base_dir;pub use common::error::Result;pub use common::error::VsdbError;