Server

Trait Server 

Source
pub trait Server {
    // Required methods
    fn auth<'life0, 'async_trait>(
        &'life0 self,
        rx_req: Receiver<AuthenticateRequest>,
        tx_res: Sender<AuthenticateResponse>,
    ) -> Pin<Box<dyn Future<Output = Result<(), ServerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn status<'life0, 'async_trait>(
        &'life0 self,
        request: StatusRequest,
        auth_token: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<StatusResponse, ServerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list<'life0, 'async_trait>(
        &'life0 self,
        auth_token: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Metadata>, ServerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn download<'life0, 'async_trait>(
        &'life0 self,
        request: DownloadRequest,
        auth_token: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Receiver<DownloadResponse>, ServerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn upload<'life0, 'async_trait>(
        &'life0 self,
        rx: Receiver<UploadRequest>,
        auth_token: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<(), ServerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn auth<'life0, 'async_trait>( &'life0 self, rx_req: Receiver<AuthenticateRequest>, tx_res: Sender<AuthenticateResponse>, ) -> Pin<Box<dyn Future<Output = Result<(), ServerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn status<'life0, 'async_trait>( &'life0 self, request: StatusRequest, auth_token: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<StatusResponse, ServerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list<'life0, 'async_trait>( &'life0 self, auth_token: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Metadata>, ServerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn download<'life0, 'async_trait>( &'life0 self, request: DownloadRequest, auth_token: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<Receiver<DownloadResponse>, ServerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn upload<'life0, 'async_trait>( &'life0 self, rx: Receiver<UploadRequest>, auth_token: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<(), ServerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§