#[non_exhaustive]pub enum Error {
Show 16 variants
DuplicateHeader(HeaderName),
EmptyAuth,
Forbidden {
message: String,
},
BasicAuthWithHttp,
HttpError(Box<Error>),
HttpNotOk(StatusCode, String),
Query(Box<QueryError>),
Decode(String),
Tls(String),
Protocol(String),
Transaction(String),
OAuth2(String),
InconsistentData,
ReachMaxAttempt(usize),
InvalidHost(String),
InternalError(String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicateHeader(HeaderName)
EmptyAuth
Forbidden
BasicAuthWithHttp
HttpError(Box<Error>)
HttpNotOk(StatusCode, String)
Query(Box<QueryError>)
A query failed on the Trino coordinator. Match on the inner
QueryError’s error_code / error_name / error_type to react to
a specific failure; the full structured error is also reachable through
std::error::Error::source.
Decode(String)
Failed to decode or deserialize a response or a spooled segment.
Tls(String)
Failed to load or read a TLS certificate.
Protocol(String)
The server used a protocol the client cannot handle in this context
(e.g. mixing the Direct and Spooled protocols across pages, or spooled
data received without the spooling feature enabled).
Transaction(String)
A transaction operation was attempted in a state that does not allow it — starting a transaction while one is already active, or committing or rolling back without one.
OAuth2(String)
The interactive OAuth2 authentication flow failed (no token server in the challenge, the token endpoint returned an error, or it timed out).
InconsistentData
ReachMaxAttempt(usize)
InvalidHost(String)
InternalError(String)
An unexpected, internal failure that callers are not expected to handle.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<QueryError> for Error
impl From<QueryError> for Error
Source§fn from(err: QueryError) -> Self
fn from(err: QueryError) -> Self
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more