pub struct DoclingTaskHandle { /* private fields */ }Expand description
A resumable handle to a whole-document asynchronous Docling conversion.
The caller controls the polling cadence and deadline; the underlying remote
task keeps running in Docling while this handle is idle, so the handle can
be serialized by its task_id and resumed after a restart
by submitting a new handle for the same remote task through the client API.
Implementations§
Source§impl DoclingTaskHandle
impl DoclingTaskHandle
pub fn task_id(&self) -> &str
Sourcepub async fn poll_status(&self) -> Result<TaskStatusResponse>
pub async fn poll_status(&self) -> Result<TaskStatusResponse>
Poll the remote task status. Uses Docling’s long-polling endpoint, which blocks server-side for a bounded period before returning the status.
Sourcepub async fn fetch_result(&self) -> Result<ConvertedDocument>
pub async fn fetch_result(&self) -> Result<ConvertedDocument>
Fetch and parse the completed remote result. Requires the task to have
reached a terminal status; call Self::poll_status first.
Trait Implementations§
Source§impl Clone for DoclingTaskHandle
impl Clone for DoclingTaskHandle
Source§fn clone(&self) -> DoclingTaskHandle
fn clone(&self) -> DoclingTaskHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for DoclingTaskHandle
impl !RefUnwindSafe for DoclingTaskHandle
impl !UnwindSafe for DoclingTaskHandle
impl Send for DoclingTaskHandle
impl Sync for DoclingTaskHandle
impl Unpin for DoclingTaskHandle
impl UnsafeUnpin for DoclingTaskHandle
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