#[non_exhaustive]pub enum DocumentError {
NotFound(String),
InvalidCursorContext(String),
OutOfRange(String),
InvalidArgument(String),
Unsupported(String),
Internal(Error),
}Expand description
Errors returned by the public text-document API.
The Display text is the original human-readable message; the variant
carries the machine-matchable category. Marked #[non_exhaustive] so
new categories can be added without breaking callers — match with a
_ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound(String)
A referenced entity (block, cell, document, …) does not exist.
InvalidCursorContext(String)
An operation was attempted with the cursor in the wrong structural context (e.g. a table operation while not inside a table).
OutOfRange(String)
An index or position was outside the valid range.
InvalidArgument(String)
The arguments were individually valid but invalid in combination (e.g. a selection spanning multiple frames, mismatched tables).
Unsupported(String)
The requested operation is not available in this build — e.g. crate::TextDocument::to_pdf
called against a text-document build that did not enable the pdf cargo feature.
Internal(Error)
Any other error propagated from the backend layers.
Trait Implementations§
Source§impl Debug for DocumentError
impl Debug for DocumentError
Source§impl Display for DocumentError
impl Display for DocumentError
Source§impl Error for DocumentError
impl Error for DocumentError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()