pub enum DoclingError {
Http(Error),
Api {
status_code: u16,
body: String,
},
Json(Error),
Io(Error),
TaskFailed {
task_id: String,
status: String,
},
Timeout {
task_id: String,
elapsed_secs: f64,
},
}Expand description
Errors that can occur when using the Docling SDK.
Variants§
Http(Error)
Network-level or HTTP client error (connection refused, DNS failure, etc.).
Api
The server returned a non-success HTTP status code.
Json(Error)
Failed to deserialize the response body.
Io(Error)
File I/O error (e.g. reading a local file for upload).
TaskFailed
An async task failed on the server.
Timeout
Timed out waiting for an async task to complete.
Trait Implementations§
Source§impl Debug for DoclingError
impl Debug for DoclingError
Source§impl Display for DoclingError
impl Display for DoclingError
Source§impl Error for DoclingError
impl Error for DoclingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for DoclingError
impl From<Error> for DoclingError
Source§impl From<Error> for DoclingError
impl From<Error> for DoclingError
Auto Trait Implementations§
impl Freeze for DoclingError
impl !RefUnwindSafe for DoclingError
impl Send for DoclingError
impl Sync for DoclingError
impl Unpin for DoclingError
impl UnsafeUnpin for DoclingError
impl !UnwindSafe for DoclingError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.