1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#![doc = include_str!("../README.md")]
#![allow(unused)]

//! # Mainline
//! Rust implementation of read-only BitTorrent Mainline DHT client.

// Public modules
pub mod async_dht;
pub mod common;
pub mod dht;
pub mod error;
mod messages;
mod peers;
mod query;
mod routing_table;
mod rpc;
mod socket;
mod tokens;

pub use crate::common::Id;
pub use crate::error::Error;
pub use dht::{Dht, Testnet};

// Alias Result to be the crate Result.
pub type Result<T, E = Error> = core::result::Result<T, E>;