Skip to main content

hadris_optical/
lib.rs

1//! Optical-media entry point for Hadris.
2//!
3//! Concrete format crates remain directly accessible so callers do not lose
4//! format-specific functionality.
5//! Optical detection reports ISO 9660 and UDF independently because bridge
6//! images may validly contain both filesystems.
7
8#![no_std]
9#![deny(missing_docs)]
10
11#[cfg(feature = "std")]
12extern crate std;
13
14#[cfg(feature = "detect")]
15pub mod detect;
16#[cfg(feature = "open")]
17mod error;
18#[cfg(feature = "open")]
19mod image;
20
21#[cfg(feature = "open")]
22pub use error::{Error, OpticalFormat, Result};
23#[cfg(feature = "open")]
24pub use image::OpenPolicy;
25
26#[cfg(all(feature = "open", feature = "sync"))]
27#[path = "image_sync.rs"]
28/// Synchronous optical-image detection and opening.
29pub mod sync;
30
31#[cfg(all(feature = "open", feature = "async"))]
32#[path = "image_async.rs"]
33/// Asynchronous optical-image detection and opening.
34pub mod r#async;
35
36/// ISO 9660 filesystem support.
37#[cfg(feature = "iso")]
38pub use hadris_iso as iso;
39
40/// Universal Disk Format filesystem support.
41#[cfg(feature = "udf")]
42pub use hadris_udf as udf;
43
44/// Hybrid ISO+UDF optical-disc image creation.
45#[cfg(feature = "cd")]
46pub use hadris_cd as cd;