#[non_exhaustive]pub enum Error {
Show 13 variants
InvalidConfig {
field: &'static str,
reason: &'static str,
},
DeviceNotFound,
UnsupportedTuner,
PllUnlocked,
ConfigurationUnknown,
DeviceClosed,
Busy,
Unsupported,
StreamClosed {
reason: &'static str,
},
Usb(Error),
Transfer(TransferError),
Operation {
operation: &'static str,
source: Box<Error>,
},
Protocol {
operation: &'static str,
reason: &'static str,
},
}Expand description
Error returned by a RTL-SDR operation.
The variants preserve structured driver errors and the original nusb error values. Use
Error::kind when only a broad, backend-independent category is needed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidConfig
A receiver configuration value failed validation.
Fields
DeviceNotFound
No matching RTL-SDR device was found.
UnsupportedTuner
The connected tuner is not an R820T/R828D-family device.
PllUnlocked
The tuner PLL failed to lock after a retry.
ConfigurationUnknown
Configuration failed or was canceled; reapply a complete configuration.
DeviceClosed
The logical device session has been shut down.
Busy
The device or USB resource is already in use.
Unsupported
The requested operation is not supported by the backend or device.
StreamClosed
The stream is not running or is otherwise closed.
Usb(Error)
The USB backend returned an error outside an individual transfer.
Transfer(TransferError)
An individual USB transfer failed.
Operation
A RTL-SDR operation failed with a more specific source error.
Fields
Protocol
The device or driver violated the expected RTL-SDR protocol.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()