pub struct Api { /* private fields */ }
Expand description
Main handle and access point to working with qbittorrent
Full documentation on provided methods is available here here
Implementations§
Source§impl Api
impl Api
pub async fn new( username: &str, password: &str, address: &str, ) -> Result<Self, Error>
pub async fn application_version(&self) -> Result<String, Error>
pub async fn api_version(&self) -> Result<String, Error>
pub async fn build_info(&self) -> Result<BuildInfo, Error>
pub async fn shutdown(&self) -> Result<(), Error>
pub async fn default_save_path(&self) -> Result<String, Error>
pub async fn get_log(&self, log_request: &LogRequest) -> Result<Vec<Log>, Error>
pub async fn get_global_transfer_info( &self, ) -> Result<GlobalTransferInfo, Error>
pub async fn get_alternate_speed_limits_state( &self, ) -> Result<AlternateLimits, Error>
pub async fn toggle_alternative_speed_limits(&self) -> Result<(), Error>
pub async fn get_torrent_list(&self) -> Result<Vec<Torrent>, Error>
pub async fn add_new_torrent(&self, data: &TorrentDownload) -> Result<(), Error>
Sourcepub async fn get_all_categories(
&self,
) -> Result<BTreeMap<String, Categories>, Error>
pub async fn get_all_categories( &self, ) -> Result<BTreeMap<String, Categories>, Error>
list all categories that currently exist
pub async fn add_category(&self, name: &str, path: &str) -> Result<(), Error>
Trait Implementations§
Source§impl TorrentData<Api> for Hash
impl TorrentData<Api> for Hash
fn properties<'life0, 'life1, 'async_trait>(
&'life0 self,
api: &'life1 Api,
) -> Pin<Box<dyn Future<Output = Result<TorrentProperties, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn trackers<'life0, 'life1, 'async_trait>(
&'life0 self,
api: &'life1 Api,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tracker>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn contents<'a, 'async_trait>(
&'a self,
api: &'a Api,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentInfo<'a>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Source§impl TorrentData<Api> for Torrent
impl TorrentData<Api> for Torrent
fn properties<'life0, 'life1, 'async_trait>(
&'life0 self,
api: &'life1 Api,
) -> Pin<Box<dyn Future<Output = Result<TorrentProperties, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn trackers<'life0, 'life1, 'async_trait>(
&'life0 self,
api: &'life1 Api,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tracker>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn contents<'a, 'async_trait>(
&'a self,
api: &'a Api,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentInfo<'a>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Source§impl TorrentData<Torrent> for Api
impl TorrentData<Torrent> for Api
fn properties<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent: &'life1 Torrent,
) -> Pin<Box<dyn Future<Output = Result<TorrentProperties, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn trackers<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent: &'life1 Torrent,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tracker>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn contents<'a, 'async_trait>(
&'a self,
torrent: &'a Torrent,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentInfo<'a>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Auto Trait Implementations§
impl Freeze for Api
impl !RefUnwindSafe for Api
impl Send for Api
impl Sync for Api
impl Unpin for Api
impl !UnwindSafe for Api
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more