dhaar-torrent 0.4.0

A BitTorrent client library: peer wire protocol, piece management and a resumable on-disk store
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("error: {0}")]
    Custom(String),
    #[error("reqwest error: {0}")]
    Reqwest(#[from] reqwest::Error),
    #[error("io error: {0}")]
    Io(#[from] std::io::Error),
    #[error("toml de error: {0}")]
    Toml(#[from] toml::de::Error),
    #[error("toml ser error: {0}")]
    TomlSer(#[from] toml::ser::Error),
    #[error("bencode error: {0}")]
    Bencode(#[from] bencode_dhaar::error::Error),
    #[error("address parse error: {0}")]
    AddrParse(#[from] std::net::AddrParseError),
}

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