pub enum PrepareError {
Show 17 variants
Usage(UsageError),
New(NewError),
Io {
path: PathBuf,
error: Error,
},
Copy {
from: PathBuf,
to: PathBuf,
error: Error,
},
Unwritable {
path: PathBuf,
},
Library {
at: Place,
problem: LibraryProblem,
},
NoCargo(Error),
Cargo {
step: CargoStep,
status: ExitStatus,
said: String,
},
CargoOutput(CargoOutput),
Changed {
inputs: Vec<PathBuf>,
},
Launch {
launcher: PathBuf,
error: Error,
},
Extract {
launcher: PathBuf,
status: ExitStatus,
said: String,
},
Contract {
path: PathBuf,
error: ListingError,
},
Output(Error),
NoCacheHome,
CurrentExe(Error),
NoCarriedLock,
}Expand description
Why the command failed. Every refusal, a missing Rust toolchain included, exits with status 2 and says why on standard error.
Variants§
Usage(UsageError)
The command line is not one the toolkit takes.
New(NewError)
new refuses the directory it was given.
Io
The file or directory at path could not be read, written, found
or locked.
Copy
The file at from could not be copied to to.
Fields
Unwritable
A path the toolkit writes into a Cargo manifest, a cache file or a depfile is not one line of UTF-8.
Library
The library is not one the toolkit can build, at at: its manifest,
a lock, a source, or what its build wrote.
NoCargo(Error)
Cargo could not be started; a missing Rust toolchain is
std::io::ErrorKind::NotFound.
Cargo
A Cargo command failed.
Fields
status: ExitStatusHow Cargo exited.
CargoOutput(CargoOutput)
What Cargo reported is not what the toolkit reads from it.
Changed
The library’s inputs changed while it was built or exported, so the launcher may not be what they build; building again picks them up.
Fields
Launch
The launcher at launcher could not be started.
Extract
The built launcher refused to extract the library’s contract.
Fields
status: ExitStatusHow it exited.
Contract
The host’s contract file at path is not one this toolkit reads.
Output(Error)
Standard output could not be written.
NoCacheHome
Neither XDG_CACHE_HOME nor the platform’s own cache directory is
set to an absolute path, so the toolkit has nowhere to build.
CurrentExe(Error)
The running toolkit could not find its own executable.
NoCarriedLock
This build of the toolkit carries no Cargo.lock for new to start
a library’s lock from.
Trait Implementations§
Source§impl Debug for PrepareError
impl Debug for PrepareError
Source§impl Display for PrepareError
impl Display for PrepareError
Source§impl Error for PrepareError
impl Error for PrepareError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()