Skip to main content

LeanWorkerError

Enum LeanWorkerError 

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

Fields

§executable: PathBuf
§source: Error
§

WorkerChildUnresolved

The default worker child executable could not be resolved.

Fields

§tried: Vec<PathBuf>

Candidate paths checked by the default resolver.

§

WorkerChildNotExecutable

The resolved worker child is missing or is not executable.

Fields

§path: PathBuf
§reason: String
§

Bootstrap

Worker bootstrap preflight failed before a real command ran.

§

CapabilityBuild

The capability Lake target could not be built.

Fields

§diagnostic: LinkDiagnostics

Typed Lake/toolchain diagnostic from lean-toolchain.

§

Setup

The child process could not be prepared after spawning.

Fields

§message: String
§

Handshake

The child did not complete the startup handshake.

Fields

§message: String
§

Protocol

The worker protocol failed after the handshake.

Fields

§message: String
§

Worker

The child returned a typed worker error.

Fields

§code: String
§message: String
§

ChildExited

The child exited while a request was in flight.

Fields

§

ChildPanicOrAbort

The child exited fatally while a request was in flight.

Fields

§

Timeout

A worker operation timed out.

Fields

§operation: &'static str
§duration: Duration
§

Cancelled

A parent-side cancellation token was observed.

Fields

§operation: &'static str
§

ProgressPanic

A parent-side progress sink panicked while handling a worker event.

Fields

§message: String
§

DataSinkPanic

A parent-side data sink panicked while handling a worker row.

Fields

§message: String
§

DiagnosticSinkPanic

A parent-side diagnostic sink panicked while handling a worker diagnostic.

Fields

§message: String
§

StreamExportFailed

A streaming export returned a nonzero downstream status byte.

Fields

§status: u8
§

StreamCallbackFailed

The in-child string callback helper returned a callback failure status.

Fields

§status: u8
§description: String
§

StreamRowMalformed

A streaming callback emitted a malformed row envelope.

Fields

§message: String
§

CapabilityMetadataMalformed

A capability metadata export returned malformed JSON.

Fields

§message: String
§

CapabilityMetadataMismatch

Capability metadata did not match the caller’s requested expectation.

§

CapabilityDoctorMalformed

A capability doctor export returned malformed JSON.

Fields

§message: String
§

TypedCommandRequestEncode

A typed command request could not be serialized as JSON.

Fields

§export: String
§message: String
§

TypedCommandResponseDecode

A typed non-streaming command response could not be decoded.

Fields

§export: String
§message: String
§

TypedCommandRowDecode

A typed streaming command row payload could not be decoded.

Fields

§export: String
§stream: String
§sequence: u64
§message: String
§

TypedCommandSummaryDecode

A typed streaming command terminal summary could not be decoded.

Fields

§export: String
§message: String
§

LeaseInvalidated

A pool session lease was invalidated by a worker lifecycle transition.

Fields

§reason: String
§

WorkerPoolExhausted

A local worker pool cannot admit another distinct session key.

Fields

§max_workers: usize
§

WorkerPoolMemoryBudgetExceeded

A local worker pool cannot admit work without exceeding its RSS budget.

Fields

§current_kib: u64
§limit_kib: u64
§

WorkerPoolQueueTimeout

Waiting for local worker-pool admission exceeded the configured limit.

Fields

§waited: Duration
§

UnsupportedRequest

The public supervisor does not support the requested operation.

Fields

§operation: &'static str
§

Wait

Waiting for a child process failed.

Fields

§source: Error

Trait Implementations§

Source§

impl Debug for LeanWorkerError

Source§

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

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

impl Display for LeanWorkerError

Source§

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

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

impl Error for LeanWorkerError

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

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

Auto Trait Implementations§

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more