Generic error for body stream
This commit is contained in:
@@ -13,7 +13,6 @@ serde_json = "1.0"
|
||||
http = "1.0.0"
|
||||
humantime = "2.1.0"
|
||||
humantime-serde = "1.1.1"
|
||||
async-channel = "1.8.0"
|
||||
bytes = "1.4.0"
|
||||
chrono = { version = "0.4.19", features = ["serde"] }
|
||||
futures-util = "0.3.14"
|
||||
@@ -22,4 +21,8 @@ url = "2.5.0"
|
||||
num-traits = "0.2.16"
|
||||
hex = "0.4.3"
|
||||
rand = "0.8.5"
|
||||
thiserror = "1"
|
||||
err = { path = "../err" }
|
||||
|
||||
[patch.crates-io]
|
||||
thiserror = { git = "https://github.com/dominikwerder/thiserror.git", branch = "cstm" }
|
||||
|
||||
@@ -188,9 +188,11 @@ pub enum AsyncChannelError {
|
||||
Recv,
|
||||
}
|
||||
|
||||
pub struct BodyStream {
|
||||
//pub receiver: async_channel::Receiver<Result<Bytes, Error>>,
|
||||
pub inner: Box<dyn Stream<Item = Result<Bytes, Error>> + Send + Unpin>,
|
||||
pub struct BodyStream<E>
|
||||
where
|
||||
E: std::error::Error,
|
||||
{
|
||||
pub inner: Box<dyn Stream<Item = Result<Bytes, E>> + Send + Unpin>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user