diff options
| author | Steven Fackler <[email protected]> | 2016-01-30 10:41:47 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-05-03 20:24:07 -0700 |
| commit | de47d158c20768b8526e939e7eb3ae9175e282f2 (patch) | |
| tree | c154b16f108fd399ff06499b1317ce50fb5e1e56 /openssl/src/ssl/error.rs | |
| parent | Update openssl version in CI (diff) | |
| download | rust-openssl-de47d158c20768b8526e939e7eb3ae9175e282f2.tar.xz rust-openssl-de47d158c20768b8526e939e7eb3ae9175e282f2.zip | |
Remove NonblockingSslStream
Diffstat (limited to 'openssl/src/ssl/error.rs')
| -rw-r--r-- | openssl/src/ssl/error.rs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/openssl/src/ssl/error.rs b/openssl/src/ssl/error.rs index 2459a473..ba0c7458 100644 --- a/openssl/src/ssl/error.rs +++ b/openssl/src/ssl/error.rs @@ -149,19 +149,6 @@ pub enum SslError { OpenSslErrors(Vec<OpensslError>), } -/// An error on a nonblocking stream. -#[derive(Debug)] -pub enum NonblockingSslError { - /// A standard SSL error occurred. - SslError(SslError), - /// The OpenSSL library wants data from the remote socket; - /// the caller should wait for read readiness. - WantRead, - /// The OpenSSL library wants to send data to the remote socket; - /// the caller should wait for write readiness. - WantWrite, -} - impl fmt::Display for SslError { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { try!(fmt.write_str(error::Error::description(self))); @@ -201,39 +188,6 @@ impl error::Error for SslError { } } -impl fmt::Display for NonblockingSslError { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - fmt.write_str(error::Error::description(self)) - } -} - -impl error::Error for NonblockingSslError { - fn description(&self) -> &str { - match *self { - NonblockingSslError::SslError(ref e) => e.description(), - NonblockingSslError::WantRead => { - "The OpenSSL library wants data from the remote socket" - } - NonblockingSslError::WantWrite => { - "The OpenSSL library want to send data to the remote socket" - } - } - } - - fn cause(&self) -> Option<&error::Error> { - match *self { - NonblockingSslError::SslError(ref e) => e.cause(), - _ => None, - } - } -} - -impl From<SslError> for NonblockingSslError { - fn from(e: SslError) -> NonblockingSslError { - NonblockingSslError::SslError(e) - } -} - /// An error from the OpenSSL library #[derive(Debug, Clone, PartialEq, Eq)] pub enum OpensslError { |