#[non_exhaustive]pub enum SecureConnectError {
TlsConfiguration(TlsConfigurationError),
DriverTlsConfiguration {
band: u8,
},
Runtime(RuntimeError),
}Expand description
Error returned by typed secure connection and lifecycle entry points.
This additive type keeps TLS configuration failures matchable without
adding a variant to the released, exhaustively matchable RuntimeError.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TlsConfiguration(TlsConfigurationError)
Custom or native trust material failed validation before network I/O.
DriverTlsConfiguration
A driver band could not lower the already validated TLS policy.
Runtime(RuntimeError)
The connection reached the ordinary version gate or driver runtime.
Implementations§
Source§impl SecureConnectError
impl SecureConnectError
Sourcepub fn configuration_code(&self) -> Option<&'static str>
pub fn configuration_code(&self) -> Option<&'static str>
Return the stable TLS configuration code, or None for an ordinary
version/connection/runtime failure.
Sourcepub fn credential_safe_diagnostic(&self) -> Option<String>
pub fn credential_safe_diagnostic(&self) -> Option<String>
Return a diagnostic that is safe to expose after credentials have been resolved.
TLS diagnostics are reconstructed from typed codes without retaining
configured paths. Version diagnostics are retained only for variants
whose fields are closed version/band data. Probe, parse, connection,
query, and transaction failures may contain provider-controlled text
and therefore return None.
Sourcepub fn into_runtime_error(self) -> RuntimeError
pub fn into_runtime_error(self) -> RuntimeError
Collapse an additive secure error onto the released runtime surface.
Trait Implementations§
Source§impl Debug for SecureConnectError
impl Debug for SecureConnectError
Source§impl Display for SecureConnectError
impl Display for SecureConnectError
Source§impl Error for SecureConnectError
impl Error for SecureConnectError
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<RuntimeError> for SecureConnectError
impl From<RuntimeError> for SecureConnectError
Source§fn from(source: RuntimeError) -> Self
fn from(source: RuntimeError) -> Self
Source§impl From<TlsConfigurationError> for SecureConnectError
impl From<TlsConfigurationError> for SecureConnectError
Source§fn from(source: TlsConfigurationError) -> Self
fn from(source: TlsConfigurationError) -> Self
Auto Trait Implementations§
impl Freeze for SecureConnectError
impl RefUnwindSafe for SecureConnectError
impl Send for SecureConnectError
impl Sync for SecureConnectError
impl Unpin for SecureConnectError
impl UnsafeUnpin for SecureConnectError
impl UnwindSafe for SecureConnectError
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request