Skip to main content

lichtung_plot/
error.rs

1//! Plot construction, layout, rendering, and output errors.
2
3/// Error returned by plotting operations.
4#[derive(Debug, thiserror::Error)]
5pub enum Error {
6    /// Filesystem input or output failed.
7    #[error("I/O error: {0}")]
8    Io(#[from] std::io::Error),
9    /// Input data or a data-bound visual option is invalid.
10    #[error("data error: {0}")]
11    Data(String),
12    /// Layout, backend, font, or output rendering failed.
13    #[error("render error: {0}")]
14    Render(String),
15}
16
17/// Result returned by plotting operations.
18pub type Result<T> = std::result::Result<T, Error>;