/// Report source and image operation failures.
/// Command errors include the tool output.
#[derive(Debug, thiserror::Error)]pubenumError{/// The source or build input is invalid.
/// Read the message for the rejected value.
#[error("{0}")]
InvalidInput(String),/// A file or process operation failed.
/// Read the underlying input/output error.
#[error(transparent)]
Io(#[from]std::io::Error),/// An external tool returned a failure status.
/// Read its output for the cause.
#[error("{program} failed ({code:?}): {output}")]
Command {/// Identify the tool that failed.
/// This value contains its file name.
program:String,/// Get the process exit code.
/// None means that the process ended without an exit code.
code:Option<i32>,/// Get the tool output.
/// This text can contain source details.
output:String,},/// The operation exceeded its timeout.
/// The timeout includes source resolution.
#[error("source resolution or image build timed out")]
Timeout,}/// Return a value or a library error.
/// Use the error to inspect operation failures.
pubtypeResult<T>=std::result::Result<T, Error>;