pub fn spawn_stream_handler<P, F, Fut>(f: F) -> Result<P, Error>
where
    P: Proxy,
    F: FnMut(Request<P::Service>) -> Fut + 'static + Send,
    Fut: Future<Output = ()> + 'static + Send,
{
    let (proxy, stream) = create_proxy_and_stream::<P::Service>()?;
    fasync::spawn(for_each_or_log(stream, f));
    Ok(proxy)
}
/// Utility that spawns a new task to handle requests of a particular type. The request handler
/// must be threadsafe. The requests are handled one at a time.
Utility that spawns a new task to handle requests of a particular type. The request handler
must be threadsafe. The requests are handled one at a time.
Utility that spawns a new task to handle requests of a particular type . The request handler must be threadsafe . The requests are handled one at a time .
pub fn spawn_stream_handler<P, F, Fut>(f: F) -> Result<P, Error>
where
    P: Proxy,
    F: FnMut(Request<P::Service>) -> Fut + 'static + Send,
    Fut: Future<Output = ()> + 'static + Send,
{
    let (proxy, stream) = create_proxy_and_stream::<P::Service>()?;
    fasync::spawn(for_each_or_log(stream, f));
    Ok(proxy)
}
pub fn spawn_stream_handler < P , F , Fut > ( f : F ) -> Result < P , Error > where P : Proxy , F : FnMut ( Request < P :: Service > ) -> Fut + ' static + Send , Fut : Future < Output = ( ) > + ' static + Send , { let ( proxy , stream ) = create_proxy_and_stream :: < P :: Service > ( ) ? ; fasync :: spawn ( for_each_or_log ( stream , f ) ) ; Ok ( proxy ) }
Utility that spawns a new task to handle requests of a particular type.
Utility that spawns a new task to handle requests of a particular type .
f
F
f
F