pub struct LeanException { /* private fields */ }Expand description
A Lean exception thrown through the IO error channel.
Constructed only by the crate; the kind and message fields are
private so the bounded-message invariant survives downstream
pattern-matching.
Implementations§
Source§impl LeanException
impl LeanException
Sourcepub fn kind(&self) -> LeanExceptionKind
pub fn kind(&self) -> LeanExceptionKind
The IO.Error constructor Lean reported.
Use this to classify a Lean-thrown exception when the
caller-facing taxonomy in LeanDiagnosticCode is not specific
enough — for example, distinguishing FileNotFound from
PermissionDenied to drive different recovery paths.
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
What Lean said about the failure, truncated to at most
LEAN_ERROR_MESSAGE_LIMIT bytes on a UTF-8 char boundary.
Trait Implementations§
Source§impl Clone for LeanException
impl Clone for LeanException
Source§fn clone(&self) -> LeanException
fn clone(&self) -> LeanException
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LeanException
impl Debug for LeanException
Auto Trait Implementations§
impl Freeze for LeanException
impl RefUnwindSafe for LeanException
impl Send for LeanException
impl Sync for LeanException
impl Unpin for LeanException
impl UnsafeUnpin for LeanException
impl UnwindSafe for LeanException
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more