H3: create Error variant for Body errors
This is preparing the HttpBody integration: Error::Body(HttpBody::Error)
@@ -106,7 +106,7 @@ pub mod qpack;
use err_derive::Error;
use quinn::{ApplicationClose, ConnectionError, ReadError, WriteError};
-use std::io::ErrorKind;
+use std::{error::Error as StdError, io::ErrorKind};
use proto::ErrorCode;
@@ -152,6 +152,9 @@ pub enum Error {
/// The peer issued an HTTP/3 error code and an optional text description
#[error(display = "Http error: {:?}", _0)]
Http(HttpError, Option<String>),
+ /// Polling the issued body data yielded an error
+ #[error(display = "Polling body error: {}", _0)]
+ Body(Box<dyn StdError + Send + Sync>),
}
impl Error {
