Create the new client to interact with the Runtime API.
(self)
| 133 | |
| 134 | /// Create the new client to interact with the Runtime API. |
| 135 | pub fn build(self) -> Result<Client, Error> { |
| 136 | let uri = match self.uri { |
| 137 | Some(uri) => uri, |
| 138 | None => { |
| 139 | let uri = std::env::var("AWS_LAMBDA_RUNTIME_API").expect("Missing AWS_LAMBDA_RUNTIME_API env var"); |
| 140 | uri.try_into().expect("Unable to convert to URL") |
| 141 | } |
| 142 | }; |
| 143 | Ok(Client::with(uri, self.connector, self.pool_size)) |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | /// Create a request builder. |
no outgoing calls