use std::fmt::Debug;
#[derive(Debug, thiserror::Error)]
#[allow(missing_copy_implementations)]
pub enum Error<SessionStoreConnectorError> {
#[error("the session that was attempted to be updated does not exist, which indicates that it was concurrently modified or deleted")]
UpdatedSessionDoesNotExist,
#[error("the maximum number of retries to generate a session id was reached")]
MaximumSessionIdGenerationTriesReached {
maximum: u32,
},
#[error("the given cookie has length {actual}, but is expected to have length {expected}")]
WrongCookieLength {
expected: usize,
actual: usize,
},
#[error("{0}")]
SessionStoreConnector(SessionStoreConnectorError),
}
impl<SessionStoreConnectorError> From<SessionStoreConnectorError>
for Error<SessionStoreConnectorError>
{
fn from(error: SessionStoreConnectorError) -> Self {
Self::SessionStoreConnector(error)
}
}
mod expect_impl_error {
trait ExpectImplError: std::error::Error {}
impl<SessionStoreConnectorError: std::error::Error> ExpectImplError
for super::Error<SessionStoreConnectorError>
{
}
}