pub mod api;
mod api_error;
mod chunk_tracker;
mod create_torrent_file;
mod dht_utils;
mod file_ops;
pub mod http_api;
pub mod http_api_client;
mod peer_connection;
mod peer_info_reader;
mod read_buf;
mod session;
mod spawn_utils;
mod torrent_state;
pub mod tracing_subscriber_config_utils;
mod type_aliases;
pub use api::Api;
pub use api_error::ApiError;
pub use create_torrent_file::{create_torrent, CreateTorrentOptions};
pub use dht;
pub use peer_connection::PeerConnectionOptions;
pub use session::{
AddTorrent, AddTorrentOptions, AddTorrentResponse, ListOnlyResponse, Session, SessionOptions,
SUPPORTED_SCHEMES,
};
pub use spawn_utils::spawn as librqbit_spawn;
pub use torrent_state::{ManagedTorrent, ManagedTorrentState, TorrentStats, TorrentStatsState};
pub use buffers::*;
pub use clone_to_owned::CloneToOwned;
pub use librqbit_core::magnet::*;
pub use librqbit_core::peer_id::*;
pub use librqbit_core::torrent_metainfo::*;
#[cfg(test)]
mod tests;
pub fn version() -> &'static str {
env!("CARGO_PKG_VERSION")
}
pub fn try_increase_nofile_limit() -> anyhow::Result<u64> {
Ok(rlimit::increase_nofile_limit(1024 * 1024)?)
}