tin-nacos-wrapper 0.1.0

A Rust library for Nacos service discovery and configuration management
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("Nacos SDK error: {0}")]
    Nacos(#[from] nacos_sdk::api::error::Error),

    #[error("Network request error: {0}")]
    Request(#[from] reqwest::Error),

    #[error("JSON serialization error: {0}")]
    Json(#[from] serde_json::Error),

    #[error("Service error: {0}")]
    Service(String),

    #[error("Configuration error: {0}")]
    Config(String),
    
    #[error("Other error: {0}")]
    Other(String),
}

pub type Result<T> = std::result::Result<T, Error>;