local-store 0.2.0

Local storage primitives: platform-agnostic paths, atomic file/dir storage, atomic IO, format dispatch
Documentation
//! Pure path management and raw file storage crate for application config/data directories.
//!
//! `local-store` closes over local storage concerns: platform-agnostic path
//! resolution, atomic file/dir storage, and format dispatch. It is the storage
//! foundation of the `version-migrate` workspace, and is usable standalone
//! when schema versioning is not needed.
//!
//! ## Architecture
//!
//! - [`paths`] — `AppPaths` / `PrefPath` resolve config and data directories
//!   (`System` / `Xdg` / `CustomBase` strategies).
//! - [`storage`] — `FileStorage`: single-file storage with atomic writes
//!   (temp file + fsync + rename + parent-directory sync).
//! - [`dir_storage`] — `DirStorage` / `AsyncDirStorage`: one-file-per-entity
//!   storage with filename encoding (`Direct` / `UrlEncode` / `Base64`).
//! - [`atomic_io`] — shared low-level atomic-write primitives.
//! - [`format_convert`] — pure JSON ↔ TOML value conversion.
//! - [`errors`] — [`StoreError`], the unified error type.
//!
//! Content is stored and retrieved as opaque UTF-8 strings; serialization and
//! schema evolution are the caller's responsibility (see `version-migrate`).
#![warn(missing_docs)]

pub mod atomic_io;
pub mod dir_storage;
pub mod errors;
pub mod format_convert;
pub mod paths;
pub mod storage;

pub use dir_storage::{DirStorage, DirStorageStrategy, FilenameEncoding};
pub use errors::{IoOperationKind, StoreError};
pub use format_convert::{json_to_toml, FormatConvertError};
pub use paths::{AppPaths, PathStrategy, PrefPath};
pub use storage::{
    AtomicWriteConfig, FileStorage, FileStorageStrategy, FormatStrategy, LoadBehavior,
};

#[cfg(feature = "async")]
pub use dir_storage::AsyncDirStorage;