pub struct FilesResource { /* private fields */ }Expand description
Files 资源。
Implementations§
Source§impl FilesResource
impl FilesResource
Sourcepub fn create(&self) -> JsonRequestBuilder<FileObject>
pub fn create(&self) -> JsonRequestBuilder<FileObject>
创建文件上传请求。
Sourcepub fn retrieve(
&self,
file_id: impl Into<String>,
) -> JsonRequestBuilder<FileObject>
pub fn retrieve( &self, file_id: impl Into<String>, ) -> JsonRequestBuilder<FileObject>
获取文件对象。
Sourcepub fn list(&self) -> ListRequestBuilder<FileObject>
pub fn list(&self) -> ListRequestBuilder<FileObject>
列出文件。
Sourcepub fn delete(
&self,
file_id: impl Into<String>,
) -> JsonRequestBuilder<DeleteResponse>
pub fn delete( &self, file_id: impl Into<String>, ) -> JsonRequestBuilder<DeleteResponse>
删除文件。
Sourcepub fn content(&self, file_id: impl Into<String>) -> BytesRequestBuilder
pub fn content(&self, file_id: impl Into<String>) -> BytesRequestBuilder
获取文件内容。
Trait Implementations§
Source§impl Clone for FilesResource
impl Clone for FilesResource
Source§fn clone(&self) -> FilesResource
fn clone(&self) -> FilesResource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FilesResource
impl !RefUnwindSafe for FilesResource
impl Send for FilesResource
impl Sync for FilesResource
impl Unpin for FilesResource
impl UnsafeUnpin for FilesResource
impl !UnwindSafe for FilesResource
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