feat: added the ability to start new listeners

This commit is contained in:
Andrew Rioux
2025-02-01 03:11:09 -05:00
parent ba5145c5ae
commit f5afd60086
9 changed files with 194 additions and 14 deletions
+15
View File
@@ -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)
}
}