pub fn listen_and_fold<T, F, Fut>(
        self,
        initial: T,
        f: F,
    ) -> impl Future<Item = (), Error = io::Error> + Send + 'static
    where
        F: Fn(T, Connection) -> Fut + Send + 'static,
        T: Send + 'static,
        L: Send + 'static,
        G: Send + 'static,
        Fut: IntoFuture<Item = T, Error = std::io::Error> + Send + 'static,
        <Fut as IntoFuture>::Future: Send,
        Self: GetOriginalDst + Send + 'static,
    {
        self.listen_and_fold_inner(std::usize::MAX, initial, f)
    }
// Listen for incoming connections and dispatch them to the handler `f`.
//
// This ensures that every incoming connection has the correct options set.
// In the future it will also ensure that the connection is upgraded with
// TLS when needed.
Listen for incoming connections and dispatch them to the handler `f`.
This ensures that every incoming connection has the correct options set.
In the future it will also ensure that the connection is upgraded with
TLS when needed.
Listen for incoming connections and dispatch them to the handler ` f ` . This ensures that every incoming connection has the correct options set . In the future it will also ensure that the connection is upgraded with TLS when needed .
pub fn listen_and_fold<T, F, Fut>(
        self,
        initial: T,
        f: F,
    ) -> impl Future<Item = (), Error = io::Error> + Send + 'static
    where
        F: Fn(T, Connection) -> Fut + Send + 'static,
        T: Send + 'static,
        L: Send + 'static,
        G: Send + 'static,
        Fut: IntoFuture<Item = T, Error = std::io::Error> + Send + 'static,
        <Fut as IntoFuture>::Future: Send,
        Self: GetOriginalDst + Send + 'static,
    {
        self.listen_and_fold_inner(std::usize::MAX, initial, f)
    }
pub fn listen_and_fold < T , F , Fut > ( self , initial : T , f : F , ) -> impl Future < Item = ( ) , Error = io :: Error > + Send + ' static where F : Fn ( T , Connection ) -> Fut + Send + ' static , T : Send + ' static , L : Send + ' static , G : Send + ' static , Fut : IntoFuture < Item = T , Error = std :: io :: Error > + Send + ' static , < Fut as IntoFuture > :: Future : Send , Self : GetOriginalDst + Send + ' static , { self . listen_and_fold_inner ( std :: usize :: MAX , initial , f ) }
Listen for incoming connections and dispatch them to the handler `f`.
Listen for incoming connections and dispatch them to the handler ` f ` .
self
initial
T
f
F
self
initial
T
f
F