Update docs, cleanup for 4.0.0 release

This commit is contained in:
Igor Katson 2023-12-03 12:14:50 +00:00
parent 3160f06f65
commit 006d83d6a7
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
29 changed files with 206 additions and 116 deletions

View file

@ -24,7 +24,7 @@ type ApiState = Arc<Api>;
use crate::api::Result;
// Public API
/// An HTTP server for the API.
#[derive(Clone)]
pub struct HttpApi {
inner: ApiState,
@ -37,6 +37,8 @@ impl HttpApi {
}
}
/// Run the HTTP server forever on the given address.
/// If read_only is passed, no state-modifying methods will be exposed.
pub async fn make_http_api_and_run(
self,
addr: SocketAddr,
@ -267,11 +269,11 @@ impl HttpApi {
}
}
pub struct OnlyFiles(Vec<usize>);
pub struct InitialPeers(pub Vec<SocketAddr>);
pub(crate) struct OnlyFiles(Vec<usize>);
pub(crate) struct InitialPeers(pub Vec<SocketAddr>);
#[derive(Serialize, Deserialize, Default)]
pub struct TorrentAddQueryParams {
pub(crate) struct TorrentAddQueryParams {
pub overwrite: Option<bool>,
pub output_folder: Option<String>,
pub sub_folder: Option<String>,