pub enum SendKind<'a> {
Send(&'a mut ResponsePipe),
Push(&'a mut PushedResponsePipe),
}
Expand description
How to send data to the client.
Most often, this is Send
, but when a push promise is created,
this will be Push
. This can be used by extensions::Post
.
Variants§
Send(&'a mut ResponsePipe)
Send the response normally.
Push(&'a mut PushedResponsePipe)
Send the response as a HTTP/2 push.
Implementations§
source§impl<'a> SendKind<'a>
impl<'a> SendKind<'a>
sourcepub fn ensure_version_and_length<T>(
&self,
response: &mut Response<T>,
len: usize
)
pub fn ensure_version_and_length<T>( &self, response: &mut Response<T>, len: usize )
Ensures correct version and length (only applicable for HTTP/1 connections) of a response according to inner enum variants.