/
count_rochester
/
rust_microservices
Обзор
Документация
Войти
/
count_rochester
/
rust_microservices
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
libs/common/src/error.rs
20 строк
494 B
Гусев Андрей
Refactored outbox
01 фев 2025, 22:23
01 фев 2025, 22:23
6f45a5d
Код
Авторство
О чём код?
use serde::Serialize; use serde_with::serde_as; pub type Result<T> = core::result::Result<T, Error>; #[serde_as] #[derive(Debug, Serialize, thiserror::Error)] pub enum Error { #[error("Missing config key '{0}'")] ConfigMissing(&'static str), #[error("Wrong config format key '{0}'")] ConfigWrongFormat(&'static str), #[error("Error initializing the broker: {0}")] InitBrokerError(String), #[error("Broker error: {0}")] BrokerError(#[from] broker::Error), }