pub struct Http2Server;Expand description
HTTP/2 server with push support
Implementations§
Source§impl Http2Server
impl Http2Server
Sourcepub async fn handle_push(
&self,
body: Bytes,
headers: &HeaderMap,
_stream: &mut (dyn AsyncWrite + Unpin),
) -> Result<Response<Full<Bytes>>, Error>
pub async fn handle_push( &self, body: Bytes, headers: &HeaderMap, _stream: &mut (dyn AsyncWrite + Unpin), ) -> Result<Response<Full<Bytes>>, Error>
Handle HTTP/2 push request
Sourcepub async fn handle_client_push(
&self,
body: Bytes,
headers: &HeaderMap,
_stream: &mut (dyn AsyncWrite + Unpin),
) -> Result<Response<Full<Bytes>>, Error>
pub async fn handle_client_push( &self, body: Bytes, headers: &HeaderMap, _stream: &mut (dyn AsyncWrite + Unpin), ) -> Result<Response<Full<Bytes>>, Error>
Handle client-initiated push
Sourcepub fn is_http2_push(method: &Method, headers: &HeaderMap) -> bool
pub fn is_http2_push(method: &Method, headers: &HeaderMap) -> bool
Check if request is HTTP/2 push
Sourcepub fn create_http2_response(
status: StatusCode,
body: Bytes,
headers: &HeaderMap,
content_encoding: Option<&str>,
) -> Response<Full<Bytes>>
pub fn create_http2_response( status: StatusCode, body: Bytes, headers: &HeaderMap, content_encoding: Option<&str>, ) -> Response<Full<Bytes>>
Create HTTP/2 response
Auto Trait Implementations§
impl Freeze for Http2Server
impl RefUnwindSafe for Http2Server
impl Send for Http2Server
impl Sync for Http2Server
impl Unpin for Http2Server
impl UnsafeUnpin for Http2Server
impl UnwindSafe for Http2Server
Blanket Implementations§
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