mod.rs
1 // Copyright (C) 2019-2025 Alpha-Delta Network Inc. 2 // This file is part of the ADL library. 3 4 // The ADL library is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 9 // The ADL library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 14 // You should have received a copy of the GNU General Public License 15 // along with the ADL library. If not, see <https://www.gnu.org/licenses/>. 16 17 /// This module contains a backtraced error and its methods. 18 pub mod backtraced; 19 pub use self::backtraced::*; 20 21 /// This module contains a formatted error and its methods. 22 pub mod formatted; 23 pub use self::formatted::*; 24 25 /// This module contains the macros for making errors easily. 26 #[macro_use] 27 pub mod macros; 28 29 /// This module contains traits for making errors easily. 30 pub mod traits; 31 pub use self::traits::*; 32 33 // Right now for cleanliness of calling error functions we say each argument implements one of the follow types rather than giving a specific type. 34 // This allows us to just pass many types rather doing conversions cleaning up the code. 35 // The args can be made cleaner once https://github.com/rust-lang/rust/issues/41517 or https://github.com/rust-lang/rust/issues/63063 hits stable. 36 // Either of why would allows to generate a type alias for these trait implementing types. 37 // pub(crate) type DisplayArg = impl std::fmt::Display; 38 // pub(crate) type DebugArg = impl std::fmt::Debug; 39 // pub(crate) type ErrorArg = impl std::error::Error;