bvr_core/err.rs
1//! Error types and utilities.
2
3#[derive(thiserror::Error, Debug)]
4/// Represents an error that can occur in the application.
5pub enum Error {
6 /// An I/O error occurred.
7 #[error("i/o error {0}")]
8 Io(#[from] std::io::Error),
9
10 /// An internal error occurred.
11 #[error("internal error")]
12 Internal,
13
14 #[error("operation not supported when input is in-progress")]
15 InProgress,
16
17 #[error("operation not implemented")]
18 Unimplemented,
19}
20
21/// A specialized [Result] type for this crate's operations.
22pub type Result<T, E = Error> = std::result::Result<T, E>;