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>where
TlsErr: Error + 'static,
SvcErr: Error + 'static,
impl<TlsErr, SvcErr> Error for TlsError<TlsErr, SvcErr>where TlsErr: Error + 'static, SvcErr: Error + 'static,
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> RefUnwindSafe for TlsError<TlsErr, SvcErr>where SvcErr: RefUnwindSafe, TlsErr: RefUnwindSafe,
impl<TlsErr, SvcErr> Send for TlsError<TlsErr, SvcErr>where SvcErr: Send, TlsErr: Send,
impl<TlsErr, SvcErr> Sync for TlsError<TlsErr, SvcErr>where SvcErr: Sync, TlsErr: Sync,
impl<TlsErr, SvcErr> Unpin for TlsError<TlsErr, SvcErr>where SvcErr: Unpin, TlsErr: Unpin,
impl<TlsErr, SvcErr> UnwindSafe for TlsError<TlsErr, SvcErr>where SvcErr: UnwindSafe, TlsErr: 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