#[non_exhaustive]pub enum LeanKernelOutcome<'lean> {
Checked(LeanEvidence<'lean>),
Rejected(LeanElabFailure),
Unavailable(LeanElabFailure),
Unsupported(LeanElabFailure),
}Expand description
Outcome of crate::LeanSession::kernel_check.
Carries either a crate::LeanEvidence handle (on Checked) or a
LeanElabFailure (on every other status) so callers can both
branch on the typed status tag via Self::status and read the
structured diagnostics in the failure cases.
#[non_exhaustive] so the variant set tracks future toolchain
classification refinements without breaking exhaustive matches.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Checked(LeanEvidence<'lean>)
The kernel accepted the declaration.
Rejected(LeanElabFailure)
The declaration reached kernel checking and was refused. The failure carries the diagnostics the elaborator and kernel produced.
The capability could not produce evidence (typically a parse failure). The failure carries the diagnostics Lean produced before aborting.
Unsupported(LeanElabFailure)
The source did not name a supported kind of declaration. The failure carries any diagnostics Lean produced while classifying.
Implementations§
Source§impl LeanKernelOutcome<'_>
impl LeanKernelOutcome<'_>
Sourcepub fn status(&self) -> EvidenceStatus
pub fn status(&self) -> EvidenceStatus
Project the variant tag without consuming the payload.
Useful when the caller only needs to branch on Checked vs. one
of the failure tags before deciding whether to read the contained
LeanElabFailure diagnostics.
Trait Implementations§
Source§impl<'lean> Debug for LeanKernelOutcome<'lean>
impl<'lean> Debug for LeanKernelOutcome<'lean>
Source§impl<'lean> TryFromLean<'lean> for LeanKernelOutcome<'lean>
impl<'lean> TryFromLean<'lean> for LeanKernelOutcome<'lean>
Source§fn try_from_lean(obj: Obj<'lean>) -> LeanResult<Self>
fn try_from_lean(obj: Obj<'lean>) -> LeanResult<Self>
obj into Self, returning a
LeanError::Host with stage
[HostStage::Conversion] if the object’s kind or payload is
outside the type’s representable range. Read more