Trait kvarn::extensions::PrimeCall

source ·
pub trait PrimeCall: KvarnSendSync {
    // Required method
    fn call<'a>(
        &'a self,
        request: &'a FatRequest,
        host: &'a Host,
        addr: SocketAddr
    ) -> RetFut<'a, Option<Uri>>;
}
Expand description

Implement this to pass your extension to Extensions::add_prime.

Required Methods§

source

fn call<'a>( &'a self, request: &'a FatRequest, host: &'a Host, addr: SocketAddr ) -> RetFut<'a, Option<Uri>>

§Arguments
  • An immutable reference to the request.
  • An immutable reference to the host this request is to.
  • The SocketAddr of the requester.

Implementors§

source§

impl<F: for<'a> Fn(&'a FatRequest, &'a Host, SocketAddr) -> RetFut<'a, Option<Uri>> + Send + Sync> PrimeCall for F