pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn builder() -> ClientBuilder<()>
Sourcepub async fn list_files(
&self,
query: Option<&str>,
page_token: Option<&str>,
page_size: Option<u32>,
) -> Result<FileList>
pub async fn list_files( &self, query: Option<&str>, page_token: Option<&str>, page_size: Option<u32>, ) -> Result<FileList>
List files.
Sourcepub async fn create_file(&self, metadata: FileMetadata) -> Result<File>
pub async fn create_file(&self, metadata: FileMetadata) -> Result<File>
Create a file (metadata only, for folders).
Sourcepub async fn create_file_with_content(
&self,
metadata: FileMetadata,
content: Vec<u8>,
mime_type: &str,
) -> Result<File>
pub async fn create_file_with_content( &self, metadata: FileMetadata, content: Vec<u8>, mime_type: &str, ) -> Result<File>
Create a file with content.
Sourcepub async fn update_file(
&self,
id: &str,
metadata: FileMetadata,
) -> Result<File>
pub async fn update_file( &self, id: &str, metadata: FileMetadata, ) -> Result<File>
Update a file’s metadata.
Sourcepub async fn delete_file(&self, id: &str) -> Result<()>
pub async fn delete_file(&self, id: &str) -> Result<()>
Delete a file.
Sourcepub async fn download_file(&self, id: &str) -> Result<Bytes>
pub async fn download_file(&self, id: &str) -> Result<Bytes>
Download a file’s content.
Sourcepub async fn create_folder(
&self,
name: &str,
parent: Option<&str>,
) -> Result<File>
pub async fn create_folder( &self, name: &str, parent: Option<&str>, ) -> Result<File>
Create a folder.
Share a file.
Sourcepub async fn list_permissions(&self, id: &str) -> Result<PermissionList>
pub async fn list_permissions(&self, id: &str) -> Result<PermissionList>
List file permissions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more