pub enum HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,{
Io(Error),
NoInitialCipherSuite(NoInitialCipherSuite),
H3Connection(ConnectionError),
H3Stream(StreamError),
HyperConnection(Box<dyn Error + Send + Sync>),
QuinnConnection(ConnectionError),
ServiceFactoryError(F::Error),
ServiceError(<F::Service as HttpService>::Error),
ResBodyError(<<F::Service as HttpService>::ResBody as Body>::Error),
}
Expand description
An error that can occur when creating or running an HTTP server.
Variants§
Io(Error)
An I/O error.
NoInitialCipherSuite(NoInitialCipherSuite)
Available on crate features
http3
and tls-rustls
only.No initial cipher suite.
Refer to [h3_quinn::quinn::crypto::rustls::NoInitialCipherSuite
] for more information.
H3Connection(ConnectionError)
Available on crate feature
http3
only.h3 connection error.
Refer to [h3::error::ConnectionError
] for more information.
H3Stream(StreamError)
Available on crate feature
http3
only.h3 stream error.
Refer to [h3::error::StreamError
] for more information.
HyperConnection(Box<dyn Error + Send + Sync>)
Available on crate features
http1
or http2
only.An error that occurred while handling a hyper connection.
QuinnConnection(ConnectionError)
Available on crate feature
http3
only.An error that occurred while handling a quinn connection.
ServiceFactoryError(F::Error)
An error that occurred while calling HttpServiceFactory::new_service
.
ServiceError(<F::Service as HttpService>::Error)
An error that occurred while calling HttpService::call
.
ResBodyError(<<F::Service as HttpService>::ResBody as Body>::Error)
An error that occurred while sending a response body.
Trait Implementations§
Source§impl<F> Debug for HttpError<F>where
F: HttpServiceFactory + Debug,
F::Error: Error + Debug,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
F::Service: Debug,
impl<F> Debug for HttpError<F>where
F: HttpServiceFactory + Debug,
F::Error: Error + Debug,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
F::Service: Debug,
Source§impl<F> Display for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error + Display,
<F::Service as HttpService>::Error: Error + Display,
<<F::Service as HttpService>::ResBody as Body>::Error: Error + Display,
impl<F> Display for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error + Display,
<F::Service as HttpService>::Error: Error + Display,
<<F::Service as HttpService>::ResBody as Body>::Error: Error + Display,
Source§impl<F> Error for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
Self: Debug + Display,
impl<F> Error for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
Self: Debug + Display,
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Source§impl<F> From<ConnectionError> for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
impl<F> From<ConnectionError> for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
Source§impl<F> From<ConnectionError> for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
impl<F> From<ConnectionError> for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
Source§impl<F> From<Error> for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
impl<F> From<Error> for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
Source§impl<F> From<NoInitialCipherSuite> for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
impl<F> From<NoInitialCipherSuite> for HttpError<F>where
F: HttpServiceFactory,
F::Error: Error,
<F::Service as HttpService>::Error: Error,
<<F::Service as HttpService>::ResBody as Body>::Error: Error,
Auto Trait Implementations§
impl<F> !Freeze for HttpError<F>
impl<F> !RefUnwindSafe for HttpError<F>
impl<F> Send for HttpError<F>where
<F as HttpServiceFactory>::Error: Send,
<<F as HttpServiceFactory>::Service as HttpService>::Error: Send,
<<<F as HttpServiceFactory>::Service as HttpService>::ResBody as Body>::Error: Send,
impl<F> Sync for HttpError<F>where
<F as HttpServiceFactory>::Error: Sync,
<<F as HttpServiceFactory>::Service as HttpService>::Error: Sync,
<<<F as HttpServiceFactory>::Service as HttpService>::ResBody as Body>::Error: Sync,
impl<F> Unpin for HttpError<F>where
<F as HttpServiceFactory>::Error: Unpin,
<<F as HttpServiceFactory>::Service as HttpService>::Error: Unpin,
<<<F as HttpServiceFactory>::Service as HttpService>::ResBody as Body>::Error: Unpin,
impl<F> !UnwindSafe for HttpError<F>
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