Added
- Add timeout for canceling HTTP/2 server side connection handshake. Default to 5 seconds. #2483
- HTTP/2 handshake timeout can be configured with
ServiceConfig::client_timeout
. #2483 Response::map_into_boxed_body
. #2468body::EitherBody
enum. #2468body::None
struct. #2468- Impl
MessageBody
forbytestring::ByteString
. #2468 impl Clone for ws::HandshakeError
. #2468#[must_use]
forws::Codec
to prevent subtle bugs. #1920impl Default
forws::Codec
. #1920header::QualityItem::{max, min}
. #2486header::Quality::{MAX, MIN}
. #2486impl Display
forheader::Quality
. #2486- Connection data set through the
on_connect_ext
callbacks is now accessible only from the newRequest::conn_data()
method. #2491 Request::take_conn_data()
. #2491Request::take_req_data()
. #2487impl Clone
forRequestHead
. #2487- New methods on
MessageBody
trait,is_complete_body
andtake_complete_body
, both with default implementations, for optimisations on body types that are done in exactly one poll/chunk. #2497
Changed
- Rename
body::BoxBody::{from_body => new}
. #2468 - Body type for
Responses
returned fromResponse::{new, ok, etc...}
is nowBoxBody
. #2468 - The
Error
associated type onMessageBody
type now requiresimpl Error
(or similar). #2468 - Error types using in service builders now require
Into<Response<BoxBody>>
. #2468 From
implementations on error types now return aResponse<BoxBody>
. #2468ResponseBuilder::body(B)
now returnsResponse<EitherBody<B>>
. #2468ResponseBuilder::finish()
now returnsResponse<EitherBody<()>>
. #2468
Removed
ResponseBuilder::streaming
. #2468impl Future
forResponseBuilder
. #2468- Remove unnecessary
MessageBody
bound on types passed tobody::AnyBody::new
. #2468 - Move
body::AnyBody
toawc
. Replaced withEitherBody
andBoxBody
. #2468 impl Copy
forws::Codec
. #1920header::qitem
helper. Replaced withheader::QualityItem::max
. #2486impl TryFrom<u16>
forheader::Quality
. #2486http
module. Most everything it contained is exported at the crate root. #2488