pub enum SendKind {
Send(ResponsePipe),
Push(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(ResponsePipe)
Send the response normally.
Push(PushedResponsePipe)
Send the response as a HTTP/2 push.
Implementations§
source§impl SendKind
impl SendKind
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.
sourcepub async fn send(
self,
response: CacheReply,
request: &FatRequest,
host: &Host,
address: SocketAddr
) -> Result<()>
pub async fn send( self, response: CacheReply, request: &FatRequest, host: &Host, address: SocketAddr ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SendKind
impl !Send for SendKind
impl !Sync for SendKind
impl Unpin for SendKind
impl !UnwindSafe for SendKind
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more