pub fn new<Fut>(
        handshake: impl Fn(Chan<H, Tx, Rx>) -> Fut + Sync + Send + 'static,
        #[allow(unused)] session: S,
    ) -> Self
    where
        Fut: Future<Output = Result<(ResumeKind, Key), Err>> + Send + 'static,
    {
        Self {
            handshake: Box::new(move |chan| Box::pin(handshake(chan))),
            managed: Arc::new(DashMap::new()),
            recover_tx: Arc::new(|_, _| Recovery::Reconnect),
            recover_rx: Arc::new(|_, _| Recovery::Reconnect),
            timeout: None,
            max_pending_retries: None,
            session: PhantomData,
        }
    }
/// Create a new [`Acceptor`] which accepts connections using the specified handshake and
/// produces [`Chan`]s with the specified session type.
///
/// All session types implement [`Default`], which means you can pass in a session type `S` to
/// this method by calling `S::default()`.
///
/// By default, an [`Acceptor`] produces channels with no timeout, an unbounded number of
/// maximum pending retries, and will attempt to resume connections indefinitely. Use its
/// various builder methods to alter these.
Create a new [`Acceptor`] which accepts connections using the specified handshake and
produces [`Chan`]s with the specified session type.



By default, an [`Acceptor`] produces channels with no timeout, an unbounded number of
maximum pending retries, and will attempt to resume connections indefinitely. Use its
various builder methods to alter these.
Create a new [ ` Acceptor ` ] which accepts connections using the specified handshake and produces [ ` Chan ` ] s with the specified session type . By default an [ ` Acceptor ` ] produces channels with no timeout an unbounded number of maximum pending retries and will attempt to resume connections indefinitely . Use its various builder methods to alter these .
pub fn new<Fut>(
        handshake: impl Fn(Chan<H, Tx, Rx>) -> Fut + Sync + Send + 'static,
        #[allow(unused)] session: S,
    ) -> Self
    where
        Fut: Future<Output = Result<(ResumeKind, Key), Err>> + Send + 'static,
    {
        Self {
            handshake: Box::new(move |chan| Box::pin(handshake(chan))),
            managed: Arc::new(DashMap::new()),
            recover_tx: Arc::new(|_, _| Recovery::Reconnect),
            recover_rx: Arc::new(|_, _| Recovery::Reconnect),
            timeout: None,
            max_pending_retries: None,
            session: PhantomData,
        }
    }
pub fn new < Fut > ( handshake : impl Fn ( Chan < H , Tx , Rx > ) -> Fut + Sync + Send + ' static , # [ allow ( unused ) ] session : S , ) -> Self where Fut : Future < Output = Result < ( ResumeKind , Key ) , Err > > + Send + ' static , { Self { handshake : Box :: new ( move | chan | Box :: pin ( handshake ( chan ) ) ) , managed : Arc :: new ( DashMap :: new ( ) ) , recover_tx : Arc :: new ( | _ , _ | Recovery :: Reconnect ) , recover_rx : Arc :: new ( | _ , _ | Recovery :: Reconnect ) , timeout : None , max_pending_retries : None , session : PhantomData , } }
Create a new [`Acceptor`] which accepts connections using the specified handshake and
produces [`Chan`]s with the specified session type.
Create a new [ ` Acceptor ` ] which accepts connections using the specified handshake and produces [ ` Chan ` ] s with the specified session type .
handshake
impl Fn(Chan<H, Tx, Rx>) -> Fut + Sync + Send + 'static
session
S