blackmagic_camera_control/
error.rs1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum CameraControlError {
5 #[error("ParseError")]
6 ParseError,
7 #[error("CategoryOutOfRange")]
8 CategoryOutOfRange,
9 #[error("ConnectionTimeout")]
10 ConnectionTimeout,
11}
12
13#[derive(Error, Debug)]
14pub enum BluetoothCameraError {
15 #[error("No Bluetooth adapter detected.")]
16 NoBluetooth,
17
18 #[error("Could not find camera: `{0}`")]
19 CameraNotFound(String),
20
21 #[error(
22 "Could not find the right characteristic. Make sure you connected to the right device."
23 )]
24 NoCharacteristic,
25
26 #[error("Cannot resolve characteristic from protocol")]
27 NoCharacteristicFromProtocol,
28
29 #[error("Could not send to camera. Did you run connect()?")]
30 SendError,
31
32 #[error("Could not connect to the camera.")]
33 ConnectError,
34
35 #[error("Device Reference Error")]
36 DevRefError,
37
38 #[error("Discovery Error.")]
39 DiscoveryError,
40
41 #[cfg(feature = "ble")]
42 #[error(transparent)]
43 BTLEError(#[from] btleplug::Error),
44
45 #[error(transparent)]
46 IOError(#[from] std::io::Error),
47
48 #[error(transparent)]
49 UUIDError(#[from] uuid::Error),
50}