mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
19 lines
456 B
Rust
19 lines
456 B
Rust
#[cfg(feature = "scram")]
|
|
use getrandom::Error as RngError;
|
|
|
|
/// A wrapper enum for things that could go wrong in this crate.
|
|
#[derive(Debug)]
|
|
pub enum Error {
|
|
#[cfg(feature = "scram")]
|
|
/// An error while initializing the Rng.
|
|
RngError(RngError),
|
|
/// An error in a SASL mechanism.
|
|
SaslError(String),
|
|
}
|
|
|
|
#[cfg(feature = "scram")]
|
|
impl From<RngError> for Error {
|
|
fn from(err: RngError) -> Error {
|
|
Error::RngError(err)
|
|
}
|
|
}
|