pub enum OllamaError {
RequestError(String),
UrlError(String),
JsonError(String),
ApiError {
message: String,
status_code: Option<u16>,
},
ValidationError(String),
IoError(Error),
WalkdirError(Error),
TracingError(String),
JoinError(JoinError),
}
Expand description
Custom error type for the project indexer
This enum represents all possible errors that can occur during the project indexing process. It includes errors from:
- File system operations
- Git commands
- Ollama API calls
- JSON serialization/deserialization
- URL parsing
- Input validation
§Examples
use projets_indexer::error::OllamaError;
let error = OllamaError::ValidationError("Invalid input".to_string());
println!("Error: {}", error);
Variants§
RequestError(String)
Error occurred during an HTTP request
UrlError(String)
Error occurred while parsing a URL
JsonError(String)
Error occurred during JSON serialization/deserialization
ApiError
Error returned by the Ollama API
Fields
ValidationError(String)
Error occurred during input validation
IoError(Error)
Error occurred during I/O operations
WalkdirError(Error)
Error occurred during directory traversal
TracingError(String)
Error occurred during tracing setup
JoinError(JoinError)
Error occurred during task join
Trait Implementations§
Source§impl Debug for OllamaError
impl Debug for OllamaError
Source§impl Display for OllamaError
impl Display for OllamaError
Source§impl Error for OllamaError
impl Error for OllamaError
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<Error> for OllamaError
impl From<Error> for OllamaError
Source§impl From<Error> for OllamaError
impl From<Error> for OllamaError
Auto Trait Implementations§
impl Freeze for OllamaError
impl !RefUnwindSafe for OllamaError
impl Send for OllamaError
impl Sync for OllamaError
impl Unpin for OllamaError
impl !UnwindSafe for OllamaError
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