pub struct DocumentUploadFileRequest {
pub key: String,
/* private fields */
}Expand description
File upload request (multipart/form-data)
Fields§
§key: StringBearer API key
Implementations§
Source§impl DocumentUploadFileRequest
impl DocumentUploadFileRequest
Sourcepub fn new(key: String, knowledge_id: impl AsRef<str>) -> Self
pub fn new(key: String, knowledge_id: impl AsRef<str>) -> Self
Create a new request for a specific knowledge base id
Sourcepub fn add_file_path(self, path: impl Into<PathBuf>) -> Self
pub fn add_file_path(self, path: impl Into<PathBuf>) -> Self
Add a local file path to upload
Sourcepub fn with_options(self, opts: UploadFileOptions) -> Self
pub fn with_options(self, opts: UploadFileOptions) -> Self
Set optional parameters
Sourcepub fn options_mut(&mut self) -> &mut UploadFileOptions
pub fn options_mut(&mut self) -> &mut UploadFileOptions
Mutable access to options for incremental configuration
Sourcepub async fn send(&self) -> Result<UploadFileResponse>
pub async fn send(&self) -> Result<UploadFileResponse>
Send multipart request and parse typed response
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocumentUploadFileRequest
impl RefUnwindSafe for DocumentUploadFileRequest
impl Send for DocumentUploadFileRequest
impl Sync for DocumentUploadFileRequest
impl Unpin for DocumentUploadFileRequest
impl UnwindSafe for DocumentUploadFileRequest
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