1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#![deny(missing_docs, missing_debug_implementations)] //! Types to track error codes and details. //! //! This library provies a [`SourceError`] struct that holds: //! //! * [`ErrorCode`]: Enum whose variants indicate error code, simple //! description. //! * [`ErrorDetail`]: Enum with matching variants to `ErrorCode`, but each //! variant contains information specific to an instance of the error. //! * [`Severity`]: The severity to report the error. //! //! [`Severity`]: codespan_reporting::diagnostic::Severity //! //! # Examples //! //! Sample usage can be seen in the repository [examples]. //! //! [examples]: https://github.com/azriel91/srcerr/tree/main/examples pub use crate::model::{ErrorCode, ErrorDetail, SourceError}; // Re-export `codespan` so consumers don't have to depend on the crate directly. #[cfg(feature = "codespan")] pub use codespan; // Re-export `codespan_reporting` so consumers don't have to depend on the crate // directly. pub use codespan_reporting; pub mod fmt; pub mod model;