pub trait PdfError: Error {
// Required methods
fn code(&self) -> &str;
fn help(&self) -> Option<String>;
// Provided method
fn docs_url(&self) -> String { ... }
}Expand description
Common contract for engine error types.
pdf-engine exposes errors that flow up through the pdfluent facade
to customers. Implementing this trait gives every error a stable,
machine-readable code, an actionable help string, and a deep link to the
public error documentation site.
Required Methods§
Sourcefn code(&self) -> &str
fn code(&self) -> &str
Stable machine-readable identifier for the error.
Format: SCREAMING_SNAKE_CASE (for example "PASSWORD_REQUIRED").
These codes are part of the public API contract — bindings, log
pipelines, and customer error handlers depend on them, so they must
not change without a deprecation cycle.