#[non_exhaustive]pub enum DeepSeekError {
Api {
error: ApiError,
status: Option<u16>,
body: Option<String>,
},
Http {
status: u16,
body: Option<String>,
},
Decode {
message: String,
body: Option<String>,
},
Transport(TransportError),
Io(Error),
}Expand description
Unified error type for this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Api
API returned a structured error payload.
Http
Non-JSON or otherwise unrecognized HTTP error.
Decode
Response could not be decoded into the expected schema.
Transport(TransportError)
Transport errors from reqwest.
Io(Error)
Local filesystem error (e.g. reading a file to upload).
Trait Implementations§
Source§impl Debug for DeepSeekError
impl Debug for DeepSeekError
Source§impl Display for DeepSeekError
impl Display for DeepSeekError
Source§impl Error for DeepSeekError
impl Error for DeepSeekError
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 DeepSeekError
impl From<Error> for DeepSeekError
Auto Trait Implementations§
impl !RefUnwindSafe for DeepSeekError
impl !UnwindSafe for DeepSeekError
impl Freeze for DeepSeekError
impl Send for DeepSeekError
impl Sync for DeepSeekError
impl Unpin for DeepSeekError
impl UnsafeUnpin for DeepSeekError
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