/
oiwn
/
tarts
Обзор
Документация
Войти
/
oiwn
/
tarts
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/error.rs
26 строк
726 B
oiwn
add cube, refactoring
23 мар 2025, 09:00
23 мар 2025, 09:00
098a7bc
Код
Авторство
О чём код?
pub type Result<T> = std::result::Result<T, TartsError>; #[derive(Debug, thiserror::Error)] pub enum TartsError { #[error("Configuration error: {0}")] Config(#[from] ConfigError), #[error("IO error: {0}")] Io(#[from] std::io::Error), // #[error("System error: {0}")] // System(String), } #[derive(Debug, thiserror::Error)] pub enum ConfigError { #[error("Failed to read config file: {0}")] FileRead(#[from] std::io::Error), #[error("Failed to deserialize config: {0}")] DeserializeFormat(#[from] toml::de::Error), #[error("Failed to serialize config: {0}")] SerializeFormat(#[from] toml::ser::Error), #[error("Missing required field: {0}")] MissingField(String), }