pub enum CompletionError {
Http(String),
Json(Error),
Provider {
status: u16,
message: String,
},
Response(String),
}Expand description
Errors that can occur during a completion request.
Variants§
Http(String)
The HTTP transport returned an error.
Json(Error)
The response body could not be deserialised.
Provider
The provider returned a non-2xx status with a message.
Response(String)
The response structure was unexpected or missing required fields.
Trait Implementations§
Source§impl Debug for CompletionError
impl Debug for CompletionError
Source§impl Display for CompletionError
impl Display for CompletionError
Source§impl Error for CompletionError
impl Error for CompletionError
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 CompletionError
impl !UnwindSafe for CompletionError
impl Freeze for CompletionError
impl Send for CompletionError
impl Sync for CompletionError
impl Unpin for CompletionError
impl UnsafeUnpin for CompletionError
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