Upgrade to Hyper v0.12

This upgrade Hyper to v0.12 and updats to code to work for it. It has
being done with the minimum code change and so the logic is still
aukward for the futures model. This should be addressed in later commits
but I did not want to compilcate an already large commit.
This commit is contained in:
Guy Taylor
2019-02-19 22:04:03 +00:00
committed by Lewin Bormann
parent e0c05210c1
commit 9f7f3c3b95
10 changed files with 528 additions and 320 deletions

View File

@@ -58,10 +58,17 @@ impl fmt::Display for PollError {
/// The only method that needs to be implemented manually is `present_user_code(...)`,
/// as no assumptions are made on how this presentation should happen.
pub trait AuthenticatorDelegate {
/// Called whenever there is an client, usually if there are network problems.
///
/// Return retry information.
fn client_error(&mut self, _: &hyper::Error) -> Retry {
Retry::Abort
}
/// Called whenever there is an HttpError, usually if there are network problems.
///
/// Return retry information.
fn connection_error(&mut self, _: &hyper::Error) -> Retry {
fn connection_error(&mut self, _: &hyper::http::Error) -> Retry {
Retry::Abort
}