hadris_block/lib.rs
1//! Block devices, partition tables, and FAT filesystems for the Hadris Rust
2//! storage stack.
3//!
4//! This `no_std`-compatible facade groups format-neutral sector and block-device
5//! interfaces, GPT and MBR partition tables, filesystem detection, and
6//! FAT12/16/32 without hiding their concrete APIs.
7
8#![no_std]
9#![deny(missing_docs)]
10
11#[cfg(feature = "std")]
12extern crate std;
13
14#[cfg(feature = "detect")]
15/// Lightweight, non-destructive block-format detection.
16pub mod detect;
17#[cfg(all(feature = "detect", feature = "fat"))]
18mod error;
19#[cfg(all(feature = "detect", feature = "part", feature = "storage"))]
20/// Checked partition views for opening filesystems inside partitioned disks.
21pub mod partition;
22
23#[cfg(all(feature = "detect", feature = "fat"))]
24pub use error::{Error, Result};
25
26#[cfg(all(feature = "detect", feature = "fat", feature = "sync"))]
27#[path = "volume_sync.rs"]
28/// Synchronous detection and unified volume opening.
29pub mod sync;
30
31#[cfg(all(feature = "detect", feature = "fat", feature = "async"))]
32#[path = "volume_async.rs"]
33/// Asynchronous detection and unified volume opening.
34pub mod r#async;
35
36/// Format-neutral block geometry and device capabilities.
37#[cfg(feature = "storage")]
38pub use hadris_storage as storage;
39
40/// FAT12/16/32 filesystem support and exFAT format detection.
41///
42/// The unified volume opener supports FAT12/16/32. The leaf `hadris-fat`
43/// crate carries a separate unstable exFAT preview.
44#[cfg(feature = "fat")]
45pub use hadris_fat as fat;
46
47/// MBR, GPT, and hybrid partition-table support.
48#[cfg(feature = "part")]
49pub use hadris_part as part;