testcontainers-build 0.1.0

Build Testcontainers images from folders, remote contexts, and pluggable Git providers
Documentation
/// Report source and image operation failures.
/// Command errors include the tool output.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// 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.
pub type Result<T> = std::result::Result<T, Error>;