cargo_artifact_dependency/
error.rs1use std::io;
2use std::path::PathBuf;
3
4use cargo_install::CargoInstallError;
5use thiserror::Error;
6
7pub type Result<T> = std::result::Result<T, Error>;
9
10#[derive(Debug, Error)]
11pub enum Error {
13 #[error("i/o error: {0}")]
15 Io(#[from] io::Error),
16 #[error(transparent)]
18 CargoInstallFailed(#[from] CargoInstallError),
19 #[error("multiple installed binaries found and no `bin_name` was provided")]
21 AmbiguousInstalledBinaries,
22 #[error("no installed binaries found in `{dir}`")]
24 NoInstalledBinaries { dir: PathBuf },
25 #[error("expected built artifact at `{}`", path.display())]
27 InvalidArtifactPath { path: PathBuf },
28}