kbus_mock/
error.rs

1//! # Error Handling
2//!
3//! Error types for the kbus-mock crate.
4
5use thiserror::Error;
6
7/// Error types returned by the kbus-mock library.
8#[derive(Debug, Error)]
9pub enum Error {
10    /// The function is not implemented.
11    #[error("function is not implemented")]
12    Unimplemented,
13    /// The specified device was not found.
14    #[error("device not found")]
15    DeviceNotFound,
16    /// A generic operation error.
17    #[error("operation failed: {0}")]
18    OperationFailed(String),
19}
20
21/// A convenient type alias for results returned by the kbus-mock library.
22pub type Result<T> = std::result::Result<T, Error>;