archive_rs/
error.rs

1use std::path::PathBuf;
2
3/// Archive error.
4#[derive(thiserror::Error, Debug)]
5// NONEXHAUSTIVE new formats could add new error types
6#[non_exhaustive]
7pub enum Error {
8    /// I/O error.
9    #[error("I/O error: {0}")]
10    Io(#[from] std::io::Error),
11
12    /// Unsupported archive file type.
13    #[error("unsupported archive file type: {0}")]
14    UnsupportedArchiveType(PathBuf),
15}
16
17// used internally
18pub type Result<T> = std::result::Result<T, Error>;