hackrf-rs 0.7.0

Rust library for accessing Hackrf.
Documentation
use eusb::error::Error as UsbError;

#[derive(thiserror::Error, Debug)]
pub enum HackRFError {
    #[error("usb error: {0}")]
    Usb(String),
    #[error("can't find any HackRF")]
    NoDevice,
    #[error("param error: {0}")]
    ParamErr(String),
}


impl  From<UsbError> for HackRFError{
    fn from(value: UsbError) -> Self {
        let msg = value.to_string();
        HackRFError::Usb(msg)
    }
}
pub type Result<T> = std::result::Result<T, HackRFError>;