(&mut self, username: &str, password: &str)
| 329 | } |
| 330 | |
| 331 | fn login(&mut self, username: &str, password: &str) -> Result<(), EmailServiceError> { |
| 332 | let command = format!("LOGIN {} {}", imap_quote(username), imap_quote(password)); |
| 333 | self.run_command(&command) |
| 334 | .map(|_| ()) |
| 335 | .map_err(|error| match error { |
| 336 | EmailServiceError::Api(message) => EmailServiceError::Authentication(message), |
| 337 | other => other, |
| 338 | }) |
| 339 | } |
| 340 | |
| 341 | fn logout(&mut self) { |
| 342 | let _ = self.run_command("LOGOUT"); |
no test coverage detected