pub trait Files:
Send
+ Sync
+ 'static {
type DownloadStream: Stream<Item = Result<DownloadChunk, Status>> + Send + 'static;
// Required methods
fn upload<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<UploadChunk>>,
) -> Pin<Box<dyn Future<Output = Result<Response<UploadResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn download<'life0, 'async_trait>(
&'life0 self,
request: Request<DownloadRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DownloadStream>, 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 FilesServer.
Required Associated Types§
Sourcetype DownloadStream: Stream<Item = Result<DownloadChunk, Status>> + Send + 'static
type DownloadStream: Stream<Item = Result<DownloadChunk, Status>> + Send + 'static
Server streaming response type for the Download method.
Required Methods§
Sourcefn upload<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<UploadChunk>>,
) -> Pin<Box<dyn Future<Output = Result<Response<UploadResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upload<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<UploadChunk>>,
) -> Pin<Box<dyn Future<Output = Result<Response<UploadResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upload a tar archive and extract it into the container rootfs at dest_path