pub fn from_static(s: &'static str) -> Self {
        if s.starts_with("unix:") {
            let uds_filepath = s
                .strip_prefix("unix://")
                .or_else(|| s.strip_prefix("unix:"))
                .expect("Invalid unix domain socket URI");
            Self::new_uds(uds_filepath)
        } else {
            let uri = Uri::from_static(s);
            Self::new_uri(uri)
        }
    }
Convert an `Endpoint` from a static string.

# Panics

This function panics if the argument is an invalid URI.

```
# use tonic::transport::Endpoint;
Endpoint::from_static("https://example.com");
```
tonic/src/transport/channel/endpoint.rs