pub enum GroqError {
RequestFailed(Error),
JsonParseError(Error),
ApiError {
message: String,
type_: String,
},
}
Expand description
Represents errors that can occur when interacting with the GROQ API.
RequestFailed
: Indicates a failure in the underlying HTTP request.JsonParseError
: Indicates a failure in parsing the JSON response from the API.ApiError
: Indicates an error returned by the API, with a message and error type.
Variants§
Trait Implementations§
Source§impl Error for GroqError
impl Error for GroqError
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()
Auto Trait Implementations§
impl Freeze for GroqError
impl !RefUnwindSafe for GroqError
impl Send for GroqError
impl Sync for GroqError
impl Unpin for GroqError
impl !UnwindSafe for GroqError
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