korrosync/model/error.rs
1//! Error types for the model layer.
2//!
3//! This module defines error types that can occur during model operations,
4//! such as user creation, password hashing, or validation failures.
5//!
6
7use thiserror::Error;
8
9#[derive(Debug, Error)]
10pub enum Error {
11 #[error(transparent)]
12 Runtime(Box<dyn std::error::Error + Send + Sync>),
13}
14
15impl Error {
16 pub fn runtime(e: impl std::error::Error + Send + Sync + 'static) -> Self {
17 Error::Runtime(Box::new(e))
18 }
19}