pub struct File<'a> { /* private fields */ }Implementations§
Source§impl<'a> File<'a>
impl<'a> File<'a>
pub fn new(client: &'a Client) -> Self
Sourcepub async fn create(
&self,
files: Vec<&str>,
purpose: FilePurpose,
descriptions: Option<Vec<&str>>,
) -> Result<FileUploadOutput, DashScopeError>
pub async fn create( &self, files: Vec<&str>, purpose: FilePurpose, descriptions: Option<Vec<&str>>, ) -> Result<FileUploadOutput, DashScopeError>
Sourcepub async fn retrieve(
&self,
file_id: &str,
) -> Result<FileRetrieveOutput, DashScopeError>
pub async fn retrieve( &self, file_id: &str, ) -> Result<FileRetrieveOutput, DashScopeError>
查询文件信息
Sourcepub async fn list(
&self,
page_no: Option<u64>,
page_size: Option<u64>,
) -> Result<FileListOutput, DashScopeError>
pub async fn list( &self, page_no: Option<u64>, page_size: Option<u64>, ) -> Result<FileListOutput, DashScopeError>
查询文件列表
Sourcepub async fn delete(
&self,
file_id: &str,
) -> Result<FileDeleteOutput, DashScopeError>
pub async fn delete( &self, file_id: &str, ) -> Result<FileDeleteOutput, DashScopeError>
删除文件
Auto Trait Implementations§
impl<'a> Freeze for File<'a>
impl<'a> !RefUnwindSafe for File<'a>
impl<'a> Send for File<'a>
impl<'a> Sync for File<'a>
impl<'a> Unpin for File<'a>
impl<'a> !UnwindSafe for File<'a>
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