pub trait FileOps {
    // Required methods
    fn get_by_name<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        drive_id: &'life1 str,
        parent_id: &'life2 str,
        name: &'life3 str
    ) -> Pin<Box<dyn Future<Output = Result<Response<Vec<File>>, ClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn create_or_update<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
        &'life0 self,
        drive_id: &'life1 str,
        parent_id: &'life2 str,
        name: &'life3 str,
        mime_type: &'life4 str,
        contents: &'life5 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<Response<File>, ClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait;
    fn download_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, ClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_folder<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        drive_id: &'life1 str,
        parent_id: &'life2 str,
        name: &'life3 str
    ) -> Pin<Box<dyn Future<Output = Result<Response<File>, ClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn get_contents_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Response<String>, ClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_by_name<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        drive_id: &'life1 str,
        parent_id: &'life2 str,
        name: &'life3 str
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, ClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}

Required Methods§

source

fn get_by_name<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, drive_id: &'life1 str, parent_id: &'life2 str, name: &'life3 str ) -> Pin<Box<dyn Future<Output = Result<Response<Vec<File>>, ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Get a file by it’s name.

source

fn create_or_update<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, drive_id: &'life1 str, parent_id: &'life2 str, name: &'life3 str, mime_type: &'life4 str, contents: &'life5 [u8] ) -> Pin<Box<dyn Future<Output = Result<Response<File>, ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Create or update a file in a drive. If the file already exists, it will update it. If the file does not exist, it will create it.

source

fn download_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Download a file by it’s ID.

source

fn create_folder<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, drive_id: &'life1 str, parent_id: &'life2 str, name: &'life3 str ) -> Pin<Box<dyn Future<Output = Result<Response<File>, ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a folder, if it doesn’t exist, returns the ID of the folder.

source

fn get_contents_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Response<String>, ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a file’s contents by it’s ID. Only works for Google Docs.

source

fn delete_by_name<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, drive_id: &'life1 str, parent_id: &'life2 str, name: &'life3 str ) -> Pin<Box<dyn Future<Output = Result<Response<()>, ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Delete a file by its name.

Implementors§