tekhsi_rs 0.1.1

High-performance client for Tektronix TekHSI enabled oscilloscopes
Documentation
use thiserror::Error;

/// Errors returned when starting a subscription.
#[derive(Debug, Clone, Error)]
pub enum SubscriptionError {
    #[error("subscription already active")]
    AlreadyActive,
    #[error("active symbols list cannot be empty")]
    EmptySymbols,
    #[error("subscription fatal error")]
    Fatal,
}

/// Errors returned when updating an active subscription.
#[derive(Debug, Clone, Error)]
pub enum SubscriptionUpdateError {
    #[error("no active subscription")]
    NotActive,
    #[error("active symbols list cannot be empty")]
    EmptySymbols,
    #[error("failed to update active symbols")]
    UpdateFailed,
    #[error("subscription fatal error")]
    Fatal,
}