Trait Api
Source pub trait Api:
Send
+ Sync
+ for<'a> ApiAdd<'a> {
// Required methods
fn login<'life0, 'life1, 'life2, 'async_trait>(
host: &'life0 str,
user: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Self, ApiError>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn host(&self) -> String;
fn user(&self) -> String;
fn password(&self) -> String;
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TorrentList, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 SingleTarget,
) -> Pin<Box<dyn Future<Output = Result<Option<Torrent>, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 SingleTarget,
delete_files: bool,
) -> Pin<Box<dyn Future<Output = Result<(), ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_trackers<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 SingleTarget,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tracker>, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_tracker<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
hash: &'life1 SingleTarget,
tracker: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn remove_tracker<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
hash: &'life1 SingleTarget,
tracker: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_files<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 SingleTarget,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentContent>, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}