pub enum GroqError {
InvalidRequest(String),
RequestFailed(Error),
JsonParseError(Error),
ApiError {
message: String,
type_: String,
},
DeserializationError {
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.DeserializationError: Indicates an error with deserialization, 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 !RefUnwindSafe for GroqError
impl !UnwindSafe for GroqError
impl Freeze for GroqError
impl Send for GroqError
impl Sync for GroqError
impl Unpin for GroqError
impl UnsafeUnpin 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