pub enum AskError {
MissingApiKey,
Config(String),
UnknownProvider(String),
Http(String),
ApiStatus {
status: u16,
detail: String,
},
EmptyResponse,
OutputNotJson(String),
OutputMissingField(&'static str),
Json(Error),
}Expand description
Errors ask() can return. Includes every failure mode along the
path: config / network / API / parsing.
Variants§
MissingApiKey
Config(String)
UnknownProvider(String)
Http(String)
ApiStatus
EmptyResponse
OutputNotJson(String)
OutputMissingField(&'static str)
Json(Error)
Trait Implementations§
Source§impl Error for AskError
impl Error for AskError
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 AskError
impl !RefUnwindSafe for AskError
impl Send for AskError
impl Sync for AskError
impl Unpin for AskError
impl UnsafeUnpin for AskError
impl !UnwindSafe for AskError
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