#![deny(missing_docs, unsafe_code)]
pub mod arch;
pub mod archives;
pub mod builder;
pub mod cache;
#[cfg(feature = "download")]
pub mod downloads;
pub mod platform;
pub mod tool;
pub use arch::ToolCacheArch;
pub use cache::ToolCache;
pub use platform::ToolPlatform;
pub use tool::Tool;
#[derive(Debug, thiserror::Error)]
pub enum ToolCacheError {
#[error("Tool not found in cache: {name} {version} {arch:?}")]
ToolNotFound {
name: String,
version: String,
arch: Option<ToolCacheArch>,
},
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
#[cfg(feature = "api")]
#[error("HTTP error: {0}")]
HttpError(#[from] reqwest::Error),
#[cfg(feature = "api")]
#[error("Header error: {0}")]
HeaderError(#[from] reqwest::header::InvalidHeaderValue),
#[cfg(feature = "api")]
#[error("GitHub API error: {0}")]
ApiError(#[from] octocrab::Error),
#[cfg(feature = "zip")]
#[error("Zip error: {0}")]
ZipError(#[from] zip::result::ZipError),
#[error("Download error: {0}")]
DownloadError(String),
#[error("Tool Cache error: {0}")]
GenericError(String),
}