pub enum Problem {
BadUrl,
Unreachable,
Unauthorized,
WrongPath,
ModelNotFound,
RateLimited,
ServerError,
}Expand description
What went wrong talking to the inference endpoint.
Variants§
BadUrl
The URL isn’t an http(s) URL.
Unreachable
Nothing answered: connection refused, unknown host, timeout.
HTTP 401/403: missing or wrong API key.
WrongPath
HTTP 404 for the API itself: usually a base URL without (or with an extra) /v1.
ModelNotFound
The server doesn’t have the model that was asked for.
RateLimited
HTTP 402/429: rate limit or out of credits.
ServerError
HTTP 5xx: the server is there but failing (often still loading the model).
Implementations§
Trait Implementations§
impl Copy for Problem
Source§impl<'de> Deserialize<'de> for Problem
impl<'de> Deserialize<'de> for Problem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Problem
impl StructuralPartialEq for Problem
Auto Trait Implementations§
impl Forget for Problem
impl Freeze for Problem
impl Move for Problem
impl RefUnwindSafe for Problem
impl Send for Problem
impl Sync for Problem
impl Unpin for Problem
impl UnsafeUnpin for Problem
impl UnwindSafe for Problem
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