@@ -2,8 +2,12 @@
mod anonymous;
mod plain;
+
+#[cfg(feature = "scram")]
mod scram;
pub use self::anonymous::Anonymous;
pub use self::plain::Plain;
+
+#[cfg(feature = "scram")]
pub use self::scram::Scram;
@@ -1,14 +1,17 @@
+#[cfg(feature = "scram")]
use openssl::error::ErrorStack;
/// A wrapper enum for things that could go wrong in this crate.
#[derive(Debug)]
pub enum Error {
+ #[cfg(feature = "scram")]
/// An error in OpenSSL.
OpenSslErrorStack(ErrorStack),
/// An error in a SASL mechanism.
SaslError(String),
}
+#[cfg(feature = "scram")]
impl From<ErrorStack> for Error {
fn from(err: ErrorStack) -> Error {
Error::OpenSslErrorStack(err)