pub struct BuildErrorDisplay {Show 16 fields
pub error_code: ErrorCode,
pub command: Option<String>,
pub worker_name: Option<String>,
pub duration: Option<Duration>,
pub timeout: Option<Duration>,
pub last_output: Option<String>,
pub compiler_output: Option<String>,
pub resources: WorkerResourceState,
pub signal_info: Option<SignalInfo>,
pub exit_code: Option<i32>,
pub artifact_path: Option<String>,
pub workdir: Option<String>,
pub toolchain: Option<String>,
pub is_remote: bool,
pub custom_message: Option<String>,
pub caused_by: Vec<String>,
}Expand description
BuildErrorDisplay - Rich error display for build/compilation errors.
Builds on ErrorPanel with build-specific context:
- Command that was executed
- Worker and timing information
- Compiler output passthrough
- Resource usage at error time
- Signal/kill information
Fields§
§error_code: ErrorCodeThe underlying error code.
command: Option<String>Build command that was executed.
worker_name: Option<String>Worker where build ran.
duration: Option<Duration>Build duration.
timeout: Option<Duration>Configured timeout.
last_output: Option<String>Last line(s) of build output.
compiler_output: Option<String>Full compiler output (for passthrough).
resources: WorkerResourceStateWorker resource state at error time.
signal_info: Option<SignalInfo>Signal information for killed builds.
exit_code: Option<i32>Exit code from build process.
artifact_path: Option<String>Artifact path (for missing artifact errors).
workdir: Option<String>Working directory on remote.
toolchain: Option<String>Toolchain being used.
is_remote: boolWhether this was a local or remote build.
custom_message: Option<String>Custom message override.
caused_by: Vec<String>Error chain (caused by).
Implementations§
Source§impl BuildErrorDisplay
impl BuildErrorDisplay
Sourcepub fn compilation_failed(command: impl Into<String>) -> Self
pub fn compilation_failed(command: impl Into<String>) -> Self
Create display for compilation failure (E300).
Sourcepub fn unknown_command(command: impl Into<String>) -> Self
pub fn unknown_command(command: impl Into<String>) -> Self
Create display for unknown build command (E301).
Sourcepub fn killed_by_signal(signal: i32) -> Self
pub fn killed_by_signal(signal: i32) -> Self
Create display for build killed by signal (E302).
Sourcepub fn killed_from_exit_code(exit_code: i32) -> Self
pub fn killed_from_exit_code(exit_code: i32) -> Self
Create display for build killed by signal from exit code.
Sourcepub fn build_timeout(command: impl Into<String>) -> Self
pub fn build_timeout(command: impl Into<String>) -> Self
Create display for build timeout (E303).
Sourcepub fn output_error() -> Self
pub fn output_error() -> Self
Create display for build output capture error (E304).
Sourcepub fn workdir_error(workdir: impl Into<String>) -> Self
pub fn workdir_error(workdir: impl Into<String>) -> Self
Create display for working directory error (E305).
Sourcepub fn toolchain_error(toolchain: impl Into<String>) -> Self
pub fn toolchain_error(toolchain: impl Into<String>) -> Self
Create display for toolchain error (E306).
Sourcepub fn incremental_error() -> Self
pub fn incremental_error() -> Self
Create display for incremental build corruption (E308).
Sourcepub fn artifact_missing(artifact_path: impl Into<String>) -> Self
pub fn artifact_missing(artifact_path: impl Into<String>) -> Self
Create display for missing artifact (E309).
Sourcepub fn duration_secs(self, secs: u64) -> Self
pub fn duration_secs(self, secs: u64) -> Self
Set the build duration in seconds.
Sourcepub fn timeout_secs(self, secs: u64) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
Set the configured timeout in seconds.
Sourcepub fn last_output(self, output: impl Into<String>) -> Self
pub fn last_output(self, output: impl Into<String>) -> Self
Set the last line(s) of build output.
Sourcepub fn compiler_output(self, output: impl Into<String>) -> Self
pub fn compiler_output(self, output: impl Into<String>) -> Self
Set the full compiler output for passthrough.
Sourcepub fn memory_usage(self, used_gb: f64, total_gb: f64) -> Self
pub fn memory_usage(self, used_gb: f64, total_gb: f64) -> Self
Set memory usage.
Sourcepub fn load_average(self, load: f64) -> Self
pub fn load_average(self, load: f64) -> Self
Set load average.
Sourcepub fn disk_usage(self, percent: f64) -> Self
pub fn disk_usage(self, percent: f64) -> Self
Set disk usage percentage.
Sourcepub fn to_error_panel(&self) -> ErrorPanel
pub fn to_error_panel(&self) -> ErrorPanel
Convert to an ErrorPanel for rendering.
Sourcepub fn render(&self, ctx: OutputContext)
pub fn render(&self, ctx: OutputContext)
Render the error to stderr.
For compilation errors, this preserves and enhances rustc/cargo output rather than replacing it.
Sourcepub fn to_json_compact(&self) -> Result<String>
pub fn to_json_compact(&self) -> Result<String>
Serialize to compact JSON string.
Trait Implementations§
Source§impl Clone for BuildErrorDisplay
impl Clone for BuildErrorDisplay
Source§fn clone(&self) -> BuildErrorDisplay
fn clone(&self) -> BuildErrorDisplay
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuildErrorDisplay
impl Debug for BuildErrorDisplay
Source§impl<'de> Deserialize<'de> for BuildErrorDisplay
impl<'de> Deserialize<'de> for BuildErrorDisplay
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for BuildErrorDisplay
impl Display for BuildErrorDisplay
Source§impl Error for BuildErrorDisplay
impl Error for BuildErrorDisplay
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()