/// Will try to connect via socket using socket address in `self.inner.socket`.
///
/// Returns new connection on success or self on error.
///
/// Won't try to reconnect if socket connection is already enforced in [`Opts`].
Will try to connect via socket using socket address in `self.inner.socket`.
Returns new connection on success or self on error.

Won't try to reconnect if socket connection is already enforced in [`Opts`].
Will try to connect via socket using socket address in ` self . inner . socket ` . Returns new connection on success or self on error . Won ' t try to reconnect if socket connection is already enforced in [ ` Opts ` ] .
fn reconnect_via_socket_if_needed(self) -> Pin<Box<dyn Future<Output = Result<Conn>> + Send>> {
        // NOTE: we need to box this since it may recurse
        // see https://github.com/rust-lang/rust/issues/46415#issuecomment-528099782
        Box::pin(async move {
            if let Some(socket) = self.inner.socket.as_ref() {
                let opts = self.inner.opts.clone();
                if opts.get_socket().is_none() {
                    let mut builder = OptsBuilder::from_opts(opts);
                    builder.socket(Some(&**socket));
                    match Conn::new(builder).await {
                        Ok(conn) => return Ok(conn),
                        Err(_) => return Ok(self),
                    }
                }
            }
            Ok(self)
        })
    }
fn reconnect_via_socket_if_needed ( self ) -> Pin < Box < dyn Future < Output = Result < Conn > > + Send > > { // NOTE: we need to box this since it may recurse // see https://github.com/rust-lang/rust/issues/46415#issuecomment-528099782 Box :: pin ( async move { if let Some ( socket ) = self . inner . socket . as_ref ( ) { let opts = self . inner . opts . clone ( ) ; if opts . get_socket ( ) . is_none ( ) { let mut builder = OptsBuilder :: from_opts ( opts ) ; builder . socket ( Some ( & * * socket ) ) ; match Conn :: new ( builder ) . await { Ok ( conn ) => return Ok ( conn ) , Err ( _ ) => return Ok ( self ) , } } } Ok ( self ) } ) }
Will try to connect via socket using socket address in `self.inner.socket`.
Will try to connect via socket using socket address in ` self . inner . socket ` .
self