pub struct Uploads { /* private fields */ }Expand description
The uploads resource.
Implementations§
Source§impl Uploads
impl Uploads
Sourcepub async fn create(
&self,
params: UploadCreateParams,
) -> Result<Upload, OpenAIError>
pub async fn create( &self, params: UploadCreateParams, ) -> Result<Upload, OpenAIError>
Create a resumable upload. Parts are added with Uploads::add_part
and finalized with Uploads::complete.
Sourcepub async fn add_part(
&self,
upload_id: &str,
data: Vec<u8>,
) -> Result<UploadPart, OpenAIError>
pub async fn add_part( &self, upload_id: &str, data: Vec<u8>, ) -> Result<UploadPart, OpenAIError>
Add a chunk of bytes to an upload as a multipart data field.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Uploads
impl !UnwindSafe for Uploads
impl Freeze for Uploads
impl Send for Uploads
impl Sync for Uploads
impl Unpin for Uploads
impl UnsafeUnpin for Uploads
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