xmpp-rs-mirror/sasl/src/error.rs

17 lines
380 B
Rust
Raw Normal View History

2017-02-27 15:08:09 +00:00
use openssl::error::ErrorStack;
/// A wrapper enum for things that could go wrong in this crate.
2017-02-27 15:08:09 +00:00
#[derive(Debug)]
pub enum Error {
/// An error in OpenSSL.
2017-02-27 15:08:09 +00:00
OpenSslErrorStack(ErrorStack),
/// An error in a SASL mechanism.
2017-02-27 15:08:09 +00:00
SaslError(String),
}
impl From<ErrorStack> for Error {
fn from(err: ErrorStack) -> Error {
Error::OpenSslErrorStack(err)
}
}