Skip to main content

oxilean_kernel/error/
annotatederror_traits.rs

1//! # AnnotatedError - Trait Implementations
2//!
3//! This module contains trait implementations for `AnnotatedError`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//! - `Error`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use super::types::AnnotatedError;
13use std::fmt;
14
15impl fmt::Display for AnnotatedError {
16    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17        write!(f, "{}", self.error)?;
18        for note in &self.notes {
19            write!(f, "\n  {}", note)?;
20        }
21        Ok(())
22    }
23}
24
25impl std::error::Error for AnnotatedError {}