Skip to main content

Files

Trait Files 

Source
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§

Source

type DownloadStream: Stream<Item = Result<DownloadChunk, Status>> + Send + 'static

Server streaming response type for the Download method.

Required Methods§

Source

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

Source

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,

Download a path from the container rootfs as a tar archive

Implementors§