#[non_exhaustive]pub enum TransportErrorKind {
Timeout,
InvalidRequest,
Connect,
Body,
TooLarge,
Other,
}Expand description
Kinds of TransportError.
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.
Timeout
The request or the body read timed out.
InvalidRequest
The request could not be built (invalid URL or header); nothing was sent.
Connect
No response was received: connection refused, DNS or TLS failure, connection reset.
The request may or may not have reached the provider: a connection reset after the request was written cannot be told apart from one that was never sent. Do not assume it was not processed or billed.
Body
The response started, but reading its body failed.
TooLarge
The response body was larger than the reader’s limit
(HttpResponse::bytes_limited). Unlike the other kinds, the
response arrived whole enough to tell: it maps to
allama::Error::UnexpectedResponse, which is not retryable.
Other
Any other failure.
Trait Implementations§
Source§impl Clone for TransportErrorKind
impl Clone for TransportErrorKind
impl Copy for TransportErrorKind
Source§impl Debug for TransportErrorKind
impl Debug for TransportErrorKind
impl Eq for TransportErrorKind
Source§impl Hash for TransportErrorKind
impl Hash for TransportErrorKind
Source§impl PartialEq for TransportErrorKind
impl PartialEq for TransportErrorKind
impl StructuralPartialEq for TransportErrorKind
Auto Trait Implementations§
impl Freeze for TransportErrorKind
impl RefUnwindSafe for TransportErrorKind
impl Send for TransportErrorKind
impl Sync for TransportErrorKind
impl Unpin for TransportErrorKind
impl UnsafeUnpin for TransportErrorKind
impl UnwindSafe for TransportErrorKind
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