pub trait PrepareCall: Send + Sync {
    fn call<'a>(
        &'a self,
        request: &'a mut FatRequest,
        host: &'a Host,
        path: Option<&'a Path>,
        addr: SocketAddr
    ) -> RetFut<'a, FatResponse>; }
Expand description

Implement this to pass your extension to Extensions::add_prepare_fn or Extensions::add_prepare_single.

Required Methods§

  • A mutable reference to the request.
  • An immutable reference to the host this request is to.
  • An Option of a Path. See the docs at prepare! for when this is None.
  • The SocketAddr of the requester.