pub enum AiNeedError {
IoError(Error),
ConfigError(String),
MissingApiKey {
provider: String,
endpoint: String,
quota_reset: Option<String>,
},
InvalidApiKey {
provider: String,
endpoint: String,
quota_reset: Option<String>,
},
QuotaExceeded {
provider: String,
endpoint: String,
quota_reset: Option<String>,
},
UnsupportedModel {
provider: String,
model: String,
supported_models: Vec<String>,
},
ApiError {
provider: String,
endpoint: String,
status: u16,
message: String,
},
RequestError {
status: StatusCode,
message: String,
details: Option<String>,
},
}Variants§
IoError(Error)
ConfigError(String)
MissingApiKey
InvalidApiKey
QuotaExceeded
UnsupportedModel
ApiError
RequestError
Trait Implementations§
Source§impl Debug for AiNeedError
impl Debug for AiNeedError
Source§impl Display for AiNeedError
impl Display for AiNeedError
Source§impl Error for AiNeedError
impl Error for AiNeedError
1.30.0 · 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 AiNeedError
impl !RefUnwindSafe for AiNeedError
impl Send for AiNeedError
impl Sync for AiNeedError
impl Unpin for AiNeedError
impl !UnwindSafe for AiNeedError
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