Client::poll_ready and send_request may return Connection Errors (#132)

Closes #131
This commit is contained in:
Sean McArthur
2017-10-04 15:22:10 -07:00
committed by GitHub
parent 9e1a0c63cf
commit c4ca8f7def
6 changed files with 108 additions and 13 deletions

View File

@@ -16,6 +16,9 @@ pub enum SendError {
/// User error
User(UserError),
/// Connection error prevents sending.
Connection(Reason),
/// I/O error
Io(io::Error),
}
@@ -80,6 +83,7 @@ impl error::Error for SendError {
match *self {
User(ref e) => e.description(),
Connection(ref reason) => reason.description(),
Io(ref e) => e.description(),
}
}