pub enum SkimError {
UnsupportedLanguage(PathBuf),
ParseError(String),
TreeSitterError(LanguageError),
Io(Error),
ConfigError(String),
CacheError(String),
Utf8Error(Utf8Error),
}Expand description
Error types for Skim operations
ARCHITECTURE: Using thiserror for ergonomic error handling. All library functions return Result<T, SkimError>. NO panics allowed in library code (enforced by clippy lints).
Variants§
UnsupportedLanguage(PathBuf)
Language could not be detected from file path
ParseError(String)
tree-sitter failed to parse source code
TreeSitterError(LanguageError)
tree-sitter language loading error
Io(Error)
File I/O error (NOTE: Should only occur in CLI, not core)
ConfigError(String)
Invalid configuration
CacheError(String)
Cache error (reserved for future use)
NOTE: The CLI implements its own caching layer and doesn’t use this error.
Utf8Error(Utf8Error)
UTF-8 conversion error
Trait Implementations§
Source§impl Error for SkimError
impl Error for SkimError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<LanguageError> for SkimError
impl From<LanguageError> for SkimError
Source§fn from(source: LanguageError) -> Self
fn from(source: LanguageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SkimError
impl !RefUnwindSafe for SkimError
impl Send for SkimError
impl Sync for SkimError
impl Unpin for SkimError
impl !UnwindSafe for SkimError
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