pub struct PdfConvert { /* private fields */ }Implementations§
Source§impl PdfConvert
impl PdfConvert
pub fn builder(config: DoclingRuntimeConfig) -> ConverterBuilder
pub fn from_runtime_config(config: DoclingRuntimeConfig) -> Result<Self>
pub fn from_docling_config(config: DoclingConfig) -> Result<Self>
pub fn request_for_input(&self, input: InputDocument) -> Result<ConvertRequest>
pub async fn convert_input( &self, input: InputDocument, ) -> Result<ConvertedDocument>
pub async fn convert_input_async( &self, input: InputDocument, ) -> Result<ConvertedDocument>
Sourcepub async fn submit_async(
&self,
input: InputDocument,
) -> Result<DoclingTaskHandle>
pub async fn submit_async( &self, input: InputDocument, ) -> Result<DoclingTaskHandle>
Submit a whole-document asynchronous conversion and return a resumable
DoclingTaskHandle. Unlike Self::convert_input_async, the remote
task id is returned to the caller so polling can be paused and resumed,
even across process restarts.
Sourcepub async fn poll_remote(&self, task_id: &str) -> Result<TaskStatusResponse>
pub async fn poll_remote(&self, task_id: &str) -> Result<TaskStatusResponse>
Poll a remote task by its id. Uses Docling’s long-polling endpoint.
Sourcepub async fn fetch_remote(
&self,
input: InputDocument,
task_id: &str,
) -> Result<ConvertedDocument>
pub async fn fetch_remote( &self, input: InputDocument, task_id: &str, ) -> Result<ConvertedDocument>
Fetch and parse a completed remote task by its id. The task must have
reached a terminal status; poll with Self::poll_remote first.
pub async fn convert_bytes( &self, filename: impl Into<String>, bytes: impl Into<Bytes>, ) -> Result<ConvertedDocument>
pub async fn convert_bytes_with_input_kind( &self, filename: impl Into<String>, bytes: impl Into<Bytes>, input_kind: InputKind, ) -> Result<ConvertedDocument>
Auto Trait Implementations§
impl !RefUnwindSafe for PdfConvert
impl !UnwindSafe for PdfConvert
impl Freeze for PdfConvert
impl Send for PdfConvert
impl Sync for PdfConvert
impl Unpin for PdfConvert
impl UnsafeUnpin for PdfConvert
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