CTErrors 0.1.5

A lightweight, descriptive error enumeration for Rust projects, designed to handle common file system operations, data validation, and custom error messaging.
Documentation
pub mod errors {
    use std::fmt::Display;
    #[derive(Debug, Clone, PartialEq)]
    pub enum TErrors {
        /// Error occurred while writing to a file.
        FileWriteError,
        /// Error occurred while creating a file.
        FileCreateError,
        /// Error occurred while deleting a file.
        FileDeleteError,
        /// Error occurred while reading a file.
        FileReadError,
        /// Error occurred while reading a byte.
        ByteReadError,
        /// Error occurred while writing a byte.
        ByteWriteError,
        /// Contents of the file are empty.
        ContentsEmpty,
        /// Index out of bounds.
        IndexError,
        /// Maximum length exceeded.
        MaxLengthExceeded,
        /// Type error.
        TypeError,
        /// Key error.
        KeyError,
        /// Value error.
        ValueError,
        /// Not found.
        NotFound,
        /// Custom error.
        CustomError(String),
    }

    impl Display for TErrors {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            write!(f, "{}", self)?;
            Ok(())
        }
    }

    impl TErrors {
        /// Returns a custom error with the given message.
        pub fn custom(error: &str) -> Self {
            Self::CustomError(error.to_string())
        }
    }
}