pub struct Files<'a> { /* private fields */ }Expand description
Files resource. Borrows the pooled client; never opens local paths or remote URLs.
Implementations§
Source§impl Files<'_>
impl Files<'_>
Sourcepub async fn create(
&self,
filename: &str,
data: &[u8],
options: FileUploadOptions,
) -> Result<FileObject, Error>
pub async fn create( &self, filename: &str, data: &[u8], options: FileUploadOptions, ) -> Result<FileObject, Error>
Upload JSONL bytes with purpose batch. Identical to the existing flat upload method.
Sourcepub async fn list(
&self,
options: BatchListOptions<'_>,
purpose: Option<&str>,
) -> Result<BatchPage<FileObject>, Error>
pub async fn list( &self, options: BatchListOptions<'_>, purpose: Option<&str>, ) -> Result<BatchPage<FileObject>, Error>
Read one page; never automatically paginates.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Files<'a>
impl<'a> !UnwindSafe for Files<'a>
impl<'a> Freeze for Files<'a>
impl<'a> Send for Files<'a>
impl<'a> Sync for Files<'a>
impl<'a> Unpin for Files<'a>
impl<'a> UnsafeUnpin for Files<'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