dht-crawler 0.1.2

高性能的 Rust DHT (Distributed Hash Table) 爬虫库 | A high-performance Rust DHT crawler library for fetching torrent information from the BitTorrent DHT network
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
pub enum DHTError {
    #[error("网络错误: {0}")]
    Network(#[from] std::io::Error),

    #[error("锁中毒: {0}")]
    LockPoisoned(String),

    #[error("初始化错误: {0}")]
    Init(String),

    #[error("内部错误: {0}")]
    Internal(String),

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

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