Trait dragonfly_api::dfdaemon::dfdaemon_server::Dfdaemon
source · 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§
sourcetype SyncPiecesStream: Stream<Item = Result<SyncPiecesResponse, Status>> + Send + 'static
type SyncPiecesStream: Stream<Item = Result<SyncPiecesResponse, Status>> + Send + 'static
Server streaming response type for the SyncPieces method.
Required Methods§
sourcefn 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 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.
sourcefn 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 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.
sourcefn 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 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.