mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-27 07:25:54 +02:00
add associated error type to MessageBody (#2183)
This commit is contained in:
@@ -22,6 +22,7 @@ pub struct SendResponse<T, B> {
|
||||
impl<T, B> SendResponse<T, B>
|
||||
where
|
||||
B: MessageBody,
|
||||
B::Error: Into<Error>,
|
||||
{
|
||||
pub fn new(framed: Framed<T, Codec>, response: Response<B>) -> Self {
|
||||
let (res, body) = response.into_parts();
|
||||
@@ -38,6 +39,7 @@ impl<T, B> Future for SendResponse<T, B>
|
||||
where
|
||||
T: AsyncRead + AsyncWrite + Unpin,
|
||||
B: MessageBody + Unpin,
|
||||
B::Error: Into<Error>,
|
||||
{
|
||||
type Output = Result<Framed<T, Codec>, Error>;
|
||||
|
||||
|
Reference in New Issue
Block a user