rs_usbtmc/
error.rs

1//! ## USBTMC Errors
2//! 
3//! The errors used throughout the crate.
4//!
5
6#[allow(unused)]
7#[derive(Debug, thiserror::Error)]
8pub enum Error {
9    #[error("device not found")]
10    DeviceNotFound,
11    #[error("device is not compatible with USBTMC")]
12    DeviceIncompatible,
13    #[error("specified configuration not found")]
14    ConfigurationNotFound,
15    #[error("specified interface not found")]
16    InterfaceNotFound,
17    #[error("specified interface setting not found")]
18    InterfaceSettingNotFound,
19    #[error("bulk out endpoint not found")]
20    BulkOutEndpointNotFound,
21    #[error("bulk in endpoint not found")]
22    BulkInEndpointNotFound,
23    #[error("used incorrect endpoint")]
24    IncorrectEndpoint,
25    #[error("bulk in transfer cannot be aborted because FIFO is not empty")]
26    BulkInFIFONotEmpty,
27    #[error("no transfer in progress")]
28    StatusNoTransferInProgress,
29    #[error("control request failed")]
30    StatusFailure,
31    #[error("control request unexpectedly failed")]
32    StatusUnexpectedFailure,
33}