pub enum Unavailability {
RequiresExecution,
MetadataUnavailable,
NoBuildInformation,
ToolchainMismatch,
HelperTimedOut,
HelperDied,
UnreadableSchema,
ResponseTooLarge,
RestartBudgetExhausted,
NotSupported,
}Expand description
Why a unit has no compiler IR.
A first-class outcome rather than an error: a scan of a real project will have units nobody can analyze — a crate whose build script would have to run, a file no compile command mentions — and reporting less about those is the correct result, not a failed run.
Variants§
RequiresExecution
Analyzing it would mean running code from the project.
Cargo cannot resolve dependencies without network access or a lockfile change.
NoBuildInformation
Nothing says how the file is compiled.
ToolchainMismatch
The helper was built for a different toolchain than the project uses.
HelperTimedOut
The helper took too long and was given up on.
HelperDied
The helper stopped before answering.
UnreadableSchema
The helper answered, but not in a schema this build reads.
ResponseTooLarge
The helper produced an IR response over the protocol frame ceiling.
RestartBudgetExhausted
Consecutive helper crashes exhausted the restart budget for this run.
NotSupported
The helper does not analyze this kind of input.
Implementations§
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
Stable lowercase identifier, the same spelling this serializes as.
Sourcepub const fn worth_retrying(self) -> bool
pub const fn worth_retrying(self) -> bool
Whether trying the same unit again could plausibly go differently.
A helper that died might have died on this input in particular, and retrying costs one more crash to find out. A helper that says the input needs execution will say so every time, and retrying is only slower.
Trait Implementations§
Source§fn clone(&self) -> Unavailability
fn clone(&self) -> Unavailability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more