feat: added the ability to start new listeners
This commit is contained in:
@@ -8,6 +8,8 @@ pub enum Error {
|
||||
TokioJoin(tokio::task::JoinError),
|
||||
#[cfg(feature = "ssr")]
|
||||
Pbkdf2(pbkdf2::password_hash::errors::Error),
|
||||
#[cfg(feature = "ssr")]
|
||||
Io(std::io::Error),
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Error {
|
||||
@@ -31,6 +33,10 @@ impl std::fmt::Display for Error {
|
||||
Error::Pbkdf2(err) => {
|
||||
write!(f, "password hash error: {err:?}")
|
||||
}
|
||||
#[cfg(feature = "ssr")]
|
||||
Error::Io(err) => {
|
||||
write!(f, "io error: {err:?}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,6 +48,8 @@ impl std::error::Error for Error {
|
||||
Error::Sqlx(err) => Some(err),
|
||||
#[cfg(feature = "ssr")]
|
||||
Error::TokioJoin(err) => Some(err),
|
||||
#[cfg(feature = "ssr")]
|
||||
Error::Io(err) => Some(err),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
@@ -75,3 +83,10 @@ impl From<pbkdf2::password_hash::errors::Error> for Error {
|
||||
Self::Pbkdf2(err)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
impl From<std::io::Error> for Error {
|
||||
fn from(err: std::io::Error) -> Self {
|
||||
Self::Io(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user