oxilean_kernel/env/enverror_traits.rs
1//! # EnvError - Trait Implementations
2//!
3//! This module contains trait implementations for `EnvError`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//! - `Error`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use super::types::EnvError;
13
14impl std::fmt::Display for EnvError {
15 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16 match self {
17 EnvError::DuplicateDeclaration(name) => {
18 write!(f, "duplicate declaration: {}", name)
19 }
20 EnvError::NotFound(name) => write!(f, "declaration not found: {}", name),
21 }
22 }
23}
24
25impl std::error::Error for EnvError {}