archive-rs 0.0.1

archive file library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::PathBuf;

/// Archive error.
#[derive(thiserror::Error, Debug)]
// NONEXHAUSTIVE new formats could add new error types
#[non_exhaustive]
pub enum Error {
    /// I/O error.
    #[error("I/O error: {0}")]
    Io(#[from] std::io::Error),

    /// Unsupported archive file type.
    #[error("unsupported archive file type: {0}")]
    UnsupportedArchiveType(PathBuf),
}

// used internally
pub type Result<T> = std::result::Result<T, Error>;