Trait TransferProtocol
Source pub trait TransferProtocol: Send + Sync {
// Required methods
fn upload_file<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 TransferTask,
progress_tx: UnboundedSender<TransferProgress>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn download_file<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 TransferTask,
progress_tx: UnboundedSender<TransferProgress>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn resume_transfer<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 TransferTask,
offset: u64,
progress_tx: UnboundedSender<TransferProgress>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn supports_resume(&self) -> bool;
fn protocol_name(&self) -> &'static str;
}