#[non_exhaustive]pub enum DocumentError {
NotFound(String),
InvalidCursorContext(String),
OutOfRange(String),
InvalidArgument(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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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).
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)>
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()
Auto Trait Implementations§
impl Freeze for DocumentError
impl RefUnwindSafe for DocumentError
impl Send for DocumentError
impl Sync for DocumentError
impl Unpin for DocumentError
impl UnsafeUnpin for DocumentError
impl UnwindSafe for DocumentError
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