(&mut self, username: T, password: U)
| 178 | } |
| 179 | |
| 180 | fn set_basic_auth<T: Into<String>, U: Into<String>>(&mut self, username: T, password: U) { |
| 181 | let auth = Auth { |
| 182 | user_name: username.into(), |
| 183 | password: password.into(), |
| 184 | }; |
| 185 | match self { |
| 186 | ProxyScheme::Http { auth: a, .. } => *a = Some(auth), |
| 187 | ProxyScheme::Https { auth: a, .. } => *a = Some(auth), |
| 188 | ProxyScheme::Socks5 { auth: a, .. } => *a = Some(auth), |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | fn parse(url: Url) -> Result<Self, ProxyError> { |
| 193 | use url::Position; |
no outgoing calls
no test coverage detected