uhd 0.4.0

Bindings to the UHD (USRP Hardware Driver) library, which provides support for Ettus Research / National Instruments Universal Software Radio Peripheral devices
#[derive(Debug)]
pub struct ReceiveError {
    pub kind: ReceiveErrorKind,
    pub message: Option<String>,
}

impl ReceiveError {
    pub fn kind(&self) -> ReceiveErrorKind {
        self.kind.clone()
    }
    pub fn message(&self) -> Option<&str> {
        self.message.as_deref()
    }
}

impl std::error::Error for ReceiveError {}

#[non_exhaustive]
#[derive(Debug, Clone)]
pub enum ReceiveErrorKind {
    Timeout,
    LateCommand,
    BrokenChain,
    Overflow,
    OutOfSequence,
    Alignment,
    BadPacket,
    Other,
}