(&self)
| 200 | |
| 201 | impl Endpoint for ClientEndpoint { |
| 202 | fn credentials(&self) -> String { |
| 203 | let mut s = String::new(); |
| 204 | if !self.username.is_empty() { |
| 205 | s.push_str(&encode(&self.username)); |
| 206 | } |
| 207 | if !self.password.is_empty() { |
| 208 | s.push(':'); |
| 209 | s.push_str(&encode(&self.password)); |
| 210 | } |
| 211 | if !s.is_empty() { |
| 212 | s.push('@'); |
| 213 | } |
| 214 | s |
| 215 | } |
| 216 | |
| 217 | fn as_url(&self) -> String { |
| 218 | match self.local_proto.try_into().unwrap() { |