Trait NetworkProvider

Source
pub trait NetworkProvider: NetworkBounds {
    // Required methods
    fn request<'life0, 'async_trait>(
        &'life0 self,
        request: NetworkRequest,
    ) -> Pin<Box<dyn Future<Output = Result<NetworkResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn upload_file<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
        file_data: &'life2 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<NetworkResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn download_file<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Network operations

Required Methods§

Source

fn request<'life0, 'async_trait>( &'life0 self, request: NetworkRequest, ) -> Pin<Box<dyn Future<Output = Result<NetworkResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn upload_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, url: &'life1 str, file_data: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<NetworkResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn download_file<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§