pub trait Dfdaemon: Send + Sync + 'static {
    type SyncPiecesStream: Stream<Item = Result<SyncPiecesResponse, Status>> + Send + 'static;

    // Required methods
    fn sync_pieces<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<SyncPiecesRequest>>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SyncPiecesStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn download_task<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DownloadTaskRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn upload_task<'life0, 'async_trait>(
        &'life0 self,
        request: Request<UploadTaskRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stat_task<'life0, 'async_trait>(
        &'life0 self,
        request: Request<StatTaskRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Task>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_task<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DeleteTaskRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with DfdaemonServer.

Required Associated Types§

source

type SyncPiecesStream: Stream<Item = Result<SyncPiecesResponse, Status>> + Send + 'static

Server streaming response type for the SyncPieces method.

Required Methods§

source

fn sync_pieces<'life0, 'async_trait>( &'life0 self, request: Request<Streaming<SyncPiecesRequest>> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SyncPiecesStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

SyncPieces syncs pieces from the other peers.

source

fn download_task<'life0, 'async_trait>( &'life0 self, request: Request<DownloadTaskRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

DownloadTask downloads task back-to-source.

source

fn upload_task<'life0, 'async_trait>( &'life0 self, request: Request<UploadTaskRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

UploadTask uploads task to p2p network.

source

fn stat_task<'life0, 'async_trait>( &'life0 self, request: Request<StatTaskRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Task>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

StatTask stats task information.

source

fn delete_task<'life0, 'async_trait>( &'life0 self, request: Request<DeleteTaskRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

DeleteTask deletes task from p2p network.

Implementors§