Skip to main content

handle_upgrade

Function handle_upgrade 

pub fn handle_upgrade<T>(
    msg: T,
) -> impl Future<Output = Result<Upgraded, Box<dyn Error + Send + Sync>>> + 'static
where T: ExtensionsRef,
Expand description

Gets a pending HTTP upgrade from this message and handles it.

This can be called on types implementing ExtensionsRef:

Some notable examples are:

  • http::Request<B>
  • http::Response<B>
  • &rama_http::Request<B>
  • &rama_http::Response<B>