Struct qbittorrent::Api
source · [−]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
sourceimpl 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
sourceimpl 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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'a: 'async_trait,
Self: 'async_trait,
sourceimpl 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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'a: 'async_trait,
Self: 'async_trait,
sourceimpl 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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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
'a: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for Api
impl Send for Api
impl Sync for Api
impl Unpin for Api
impl !UnwindSafe for Api
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more