pub enum TlsError<TlsErr, SvcErr> {
Timeout,
Tls(TlsErr),
Service(SvcErr),
}
Available on crate feature
accept
only.Expand description
TLS handshake error, TLS timeout, or inner service error.
All TLS acceptors from this crate will return the SvcErr
type parameter as Infallible
,
which can be cast to your own service type, inferred or otherwise, using into_service_error
.
Variants§
Timeout
TLS handshake has timed-out.
Tls(TlsErr)
Wraps TLS service errors.
Service(SvcErr)
Wraps service errors.
Implementations§
source§impl<TlsErr> TlsError<TlsErr, Infallible>
impl<TlsErr> TlsError<TlsErr, Infallible>
sourcepub fn into_service_error<SvcErr>(self) -> TlsError<TlsErr, SvcErr>
pub fn into_service_error<SvcErr>(self) -> TlsError<TlsErr, SvcErr>
Casts the infallible service error type returned from acceptors into caller’s type.
§Examples
let a: TlsError<u32, Infallible> = TlsError::Tls(42);
let _b: TlsError<u32, u64> = a.into_service_error();
Trait Implementations§
source§impl<TlsErr, SvcErr> Error for TlsError<TlsErr, SvcErr>
impl<TlsErr, SvcErr> Error for TlsError<TlsErr, SvcErr>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<TlsErr, SvcErr> Freeze for TlsError<TlsErr, SvcErr>
impl<TlsErr, SvcErr> RefUnwindSafe for TlsError<TlsErr, SvcErr>where
TlsErr: RefUnwindSafe,
SvcErr: RefUnwindSafe,
impl<TlsErr, SvcErr> Send for TlsError<TlsErr, SvcErr>
impl<TlsErr, SvcErr> Sync for TlsError<TlsErr, SvcErr>
impl<TlsErr, SvcErr> Unpin for TlsError<TlsErr, SvcErr>
impl<TlsErr, SvcErr> UnwindSafe for TlsError<TlsErr, SvcErr>where
TlsErr: UnwindSafe,
SvcErr: UnwindSafe,
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