librqbit 8.1.1

The main library used by rqbit torrent client. The binary is just a small wrapper on top of it.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use axum::{extract::State, response::IntoResponse};

use super::ApiState;
use crate::api::Result;

pub async fn h_dht_stats(State(state): State<ApiState>) -> Result<impl IntoResponse> {
    state.api.api_dht_stats().map(axum::Json)
}

pub async fn h_dht_table(State(state): State<ApiState>) -> Result<impl IntoResponse> {
    state.api.api_dht_table().map(axum::Json)
}