pub enum LeanWorkerError {
Show 32 variants
Spawn {
executable: PathBuf,
source: Error,
},
WorkerChildUnresolved {
tried: Vec<PathBuf>,
},
WorkerChildNotExecutable {
path: PathBuf,
reason: String,
},
Bootstrap {
code: LeanWorkerBootstrapDiagnosticCode,
message: String,
},
CapabilityBuild {
diagnostic: LinkDiagnostics,
},
Setup {
message: String,
},
Handshake {
message: String,
},
Protocol {
message: String,
},
Worker {
code: String,
message: String,
},
ChildExited {
exit: LeanWorkerExit,
},
ChildPanicOrAbort {
exit: LeanWorkerExit,
},
Timeout {
operation: &'static str,
duration: Duration,
},
Cancelled {
operation: &'static str,
},
ProgressPanic {
message: String,
},
DataSinkPanic {
message: String,
},
DiagnosticSinkPanic {
message: String,
},
StreamExportFailed {
status: u8,
},
StreamCallbackFailed {
status: u8,
description: String,
},
StreamRowMalformed {
message: String,
},
CapabilityMetadataMalformed {
message: String,
},
CapabilityMetadataMismatch {
export: String,
expected: Box<LeanWorkerCapabilityMetadata>,
actual: Box<LeanWorkerCapabilityMetadata>,
},
CapabilityDoctorMalformed {
message: String,
},
TypedCommandRequestEncode {
export: String,
message: String,
},
TypedCommandResponseDecode {
export: String,
message: String,
},
TypedCommandRowDecode {
export: String,
stream: String,
sequence: u64,
message: String,
},
TypedCommandSummaryDecode {
export: String,
message: String,
},
LeaseInvalidated {
reason: String,
},
WorkerPoolExhausted {
max_workers: usize,
},
WorkerPoolMemoryBudgetExceeded {
current_kib: u64,
limit_kib: u64,
},
WorkerPoolQueueTimeout {
waited: Duration,
},
UnsupportedRequest {
operation: &'static str,
},
Wait {
source: Error,
},
}Expand description
Errors reported by the worker supervisor.
Variants§
Spawn
The worker child could not be spawned.
WorkerChildUnresolved
The default worker child executable could not be resolved.
WorkerChildNotExecutable
The resolved worker child is missing or is not executable.
Bootstrap
Worker bootstrap preflight failed before a real command ran.
CapabilityBuild
The capability Lake target could not be built.
Fields
diagnostic: LinkDiagnosticsTyped Lake/toolchain diagnostic from lean-toolchain.
Setup
The child process could not be prepared after spawning.
Handshake
The child did not complete the startup handshake.
Protocol
The worker protocol failed after the handshake.
Worker
The child returned a typed worker error.
ChildExited
The child exited while a request was in flight.
Fields
exit: LeanWorkerExitChildPanicOrAbort
The child exited fatally while a request was in flight.
Fields
exit: LeanWorkerExitTimeout
A worker operation timed out.
Cancelled
A parent-side cancellation token was observed.
ProgressPanic
A parent-side progress sink panicked while handling a worker event.
DataSinkPanic
A parent-side data sink panicked while handling a worker row.
DiagnosticSinkPanic
A parent-side diagnostic sink panicked while handling a worker diagnostic.
StreamExportFailed
A streaming export returned a nonzero downstream status byte.
StreamCallbackFailed
The in-child string callback helper returned a callback failure status.
StreamRowMalformed
A streaming callback emitted a malformed row envelope.
CapabilityMetadataMalformed
A capability metadata export returned malformed JSON.
CapabilityMetadataMismatch
Capability metadata did not match the caller’s requested expectation.
CapabilityDoctorMalformed
A capability doctor export returned malformed JSON.
TypedCommandRequestEncode
A typed command request could not be serialized as JSON.
TypedCommandResponseDecode
A typed non-streaming command response could not be decoded.
TypedCommandRowDecode
A typed streaming command row payload could not be decoded.
TypedCommandSummaryDecode
A typed streaming command terminal summary could not be decoded.
LeaseInvalidated
A pool session lease was invalidated by a worker lifecycle transition.
WorkerPoolExhausted
A local worker pool cannot admit another distinct session key.
WorkerPoolMemoryBudgetExceeded
A local worker pool cannot admit work without exceeding its RSS budget.
WorkerPoolQueueTimeout
Waiting for local worker-pool admission exceeded the configured limit.
UnsupportedRequest
The public supervisor does not support the requested operation.
Wait
Waiting for a child process failed.
Trait Implementations§
Source§impl Debug for LeanWorkerError
impl Debug for LeanWorkerError
Source§impl Display for LeanWorkerError
impl Display for LeanWorkerError
Source§impl Error for LeanWorkerError
impl Error for LeanWorkerError
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()