liblitho 0.2.0

cli tool to flash/clone the images to storage devices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Whole-disk path validation and identity.

use crate::devices::DeviceError;

/// Path rules and identity for whole-disk targets.
pub trait DevicePathOps {
    /// Require a whole-disk device path for this platform (reject partitions, etc.).
    fn validate_whole_disk_path(path: &str) -> Result<(), DeviceError>;

    /// Whether two user-facing paths refer to the same device.
    fn paths_equivalent(listed: &str, selected: &str) -> bool;

    /// Optional OS-specific I/O error hint for user-facing messages.
    fn hint_for_io_error(err: &std::io::Error) -> Option<String> {
        let _ = err;
        None
    }
}