Skip to main content

PrepareError

Enum PrepareError 

Source
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.

Fields

§path: PathBuf

The path.

§error: Error

What the system said.

§

Copy

The file at from could not be copied to to.

Fields

§from: PathBuf

The file copied.

§to: PathBuf

Where it was going.

§error: Error

What the system said.

§

Unwritable

A path the toolkit writes into a Cargo manifest, a cache file or a depfile is not one line of UTF-8.

Fields

§path: PathBuf

The path.

§

Library

The library is not one the toolkit can build, at at: its manifest, a lock, a source, or what its build wrote.

Fields

§at: Place

Where.

§problem: LibraryProblem

What is wrong there.

§

NoCargo(Error)

Cargo could not be started; a missing Rust toolchain is std::io::ErrorKind::NotFound.

§

Cargo

A Cargo command failed.

Fields

§step: CargoStep

Which command.

§status: ExitStatus

How Cargo exited.

§said: String

What Cargo wrote on standard error, when the toolkit kept it: a build’s diagnostics reach standard error as Cargo writes them.

§

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

§inputs: Vec<PathBuf>

The files that changed; none when what changed is the build’s environment or Cargo configuration, or is not known.

§

Launch

The launcher at launcher could not be started.

Fields

§launcher: PathBuf

The launcher.

§error: Error

What the system said.

§

Extract

The built launcher refused to extract the library’s contract.

Fields

§launcher: PathBuf

The launcher.

§status: ExitStatus

How it exited.

§said: String

What it wrote on standard error.

§

Contract

The host’s contract file at path is not one this toolkit reads.

Fields

§path: PathBuf

The contract file.

§error: ListingError

Why it does not read.

§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for PrepareError

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for PrepareError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CargoOutput> for PrepareError

Source§

fn from(output: CargoOutput) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for PrepareError

§

impl !UnwindSafe for PrepareError

§

impl Forget for PrepareError

§

impl Freeze for PrepareError

§

impl Move for PrepareError

§

impl Send for PrepareError
where RawVecInner: Send, Repr: Send, BoxRaw<Error>: Send, BoxRaw<Error>: Send,

§

impl Sync for PrepareError
where RawVecInner: Sync, Repr: Sync, BoxRaw<Error>: Sync, BoxRaw<Error>: Sync,

§

impl Unpin for PrepareError
where *const u8 is !null: Unpin, *const () is !null: Unpin, &'static SimpleMessage: Unpin, *const Custom is !null: Unpin, Box<Error>: Unpin, Box<Error>: Unpin,

§

impl UnsafeUnpin for PrepareError

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.