pub fn connect_timeout(self, dur: Duration) -> Self {
        Endpoint {
            connect_timeout: Some(dur),
            ..self
        }
    }
Apply a timeout to connecting to the uri.

Defaults to no timeout.

```
# use tonic::transport::Endpoint;
# use std::time::Duration;
# let mut builder = Endpoint::from_static("https://example.com");
builder.connect_timeout(Duration::from_secs(5));
```
tonic/src/transport/channel/endpoint.rs