pub type ServiceError = Box; #[allow(dead_code)] // TODO: remove when used pub trait IntoServiceError { fn into_service_error(self) -> ServiceError; } impl IntoServiceError for T where T: std::error::Error + Send + Sync + 'static, { fn into_service_error(self) -> ServiceError { Box::new(self) } }