1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-30 08:24:28 +02:00

body ergonomics v3 (#2468)

This commit is contained in:
Rob Ede
2021-12-04 19:40:47 +00:00
committed by GitHub
parent a2d5c5a058
commit c7c02ef99d
84 changed files with 2134 additions and 1685 deletions

View File

@ -30,6 +30,7 @@ use actix_web::{
use bytes::{Bytes, BytesMut};
use bytestring::ByteString;
use futures_core::Stream;
use pin_project_lite::pin_project;
use tokio::sync::oneshot::Sender;
/// Perform WebSocket handshake and start actor.
@ -462,13 +463,14 @@ where
}
}
#[pin_project::pin_project]
struct WsStream<S> {
#[pin]
stream: S,
decoder: Codec,
buf: BytesMut,
closed: bool,
pin_project! {
struct WsStream<S> {
#[pin]
stream: S,
decoder: Codec,
buf: BytesMut,
closed: bool,
}
}
impl<S> WsStream<S>