pub struct Client { /* private fields */ }Expand description
The client
Implementations§
Source§impl Client
impl Client
Sourcepub fn try_get_token(&self) -> Option<String>
pub fn try_get_token(&self) -> Option<String>
Try to get the token.
Sourcepub async fn list_user_files(&self) -> Result<ListUserFilesResponse, Error>
pub async fn list_user_files(&self) -> Result<ListUserFilesResponse, Error>
List user files.
This function requires a token.
Sourcepub async fn upload_file(
&self,
file: FileUpload,
) -> Result<UploadFileResponse, Error>
pub async fn upload_file( &self, file: FileUpload, ) -> Result<UploadFileResponse, Error>
Upload a file.
This function requires a token.
Sourcepub async fn get_file_info(&self, id: &str) -> Result<FileInfo, Error>
pub async fn get_file_info(&self, id: &str) -> Result<FileInfo, Error>
Get info about a file.
This function does NOT require a token.
Sourcepub async fn download_file(&self, id: &str) -> Result<Response, Error>
pub async fn download_file(&self, id: &str) -> Result<Response, Error>
Download a file.
This function does NOT require a token.
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