pub struct FileParseSyncRequest { /* private fields */ }Expand description
Synchronous file-parsing request for POST /files/parser/sync.
The parser implementation is fixed to the required wire value
prime-sync; callers select only the local file and optional file type.
Implementations§
Source§impl FileParseSyncRequest
impl FileParseSyncRequest
Sourcepub fn new(file_path: impl Into<PathBuf>) -> Self
pub fn new(file_path: impl Into<PathBuf>) -> Self
Create a synchronous parsing request for a local file.
Sourcepub fn with_file_type(self, file_type: FileParseSyncFileType) -> Self
pub fn with_file_type(self, file_type: FileParseSyncFileType) -> Self
Set the optional parser file type.
Sourcepub const fn file_type(&self) -> Option<FileParseSyncFileType>
pub const fn file_type(&self) -> Option<FileParseSyncFileType>
Return the optional declared file type.
Sourcepub async fn send_via(&self, client: &ZaiClient) -> ZaiResult<FileResponse>
pub async fn send_via(&self, client: &ZaiClient) -> ZaiResult<FileResponse>
Validate the local file, stream it as multipart, and decode the parsing result. The file is reopened and revalidated for the transport attempt.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileParseSyncRequest
impl RefUnwindSafe for FileParseSyncRequest
impl Send for FileParseSyncRequest
impl Sync for FileParseSyncRequest
impl Unpin for FileParseSyncRequest
impl UnsafeUnpin for FileParseSyncRequest
impl UnwindSafe for FileParseSyncRequest
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