#[non_exhaustive]pub enum EditError {
UnsupportedSchemaVersion {
found: u16,
},
PageOutOfRange {
operation: usize,
page: usize,
page_count: usize,
},
UnsupportedDocumentShape {
detail: &'static str,
},
OperationFailed {
operation: usize,
kind: EditOperationKind,
source: MutError,
},
Parse(MutError),
Serialize(MutError),
OutputAliasesInput,
InvalidPlannedOutput {
summary: String,
},
Io(Error),
}Expand description
Errors from request validation, application, or atomic output.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedSchemaVersion
The request version is not supported by this editor.
PageOutOfRange
A page-targeted operation names a page outside the document.
Fields
UnsupportedDocumentShape
This first slice intentionally supports only single-page and bundled documents; indirect documents need their external commit model.
OperationFailed
The underlying mutation primitive rejected one operation.
Fields
kind: EditOperationKindSemantic operation kind.
Parse(MutError)
The input bytes could not be parsed as a mutable DjVu document.
Serialize(MutError)
The edited mutation tree could not be serialized.
OutputAliasesInput
Input and output resolve to the same file.
InvalidPlannedOutput
The edited output failed pre-commit validation (#696): applying the request produced bytes with error-severity validation findings, so the destination was left untouched.
Io(Error)
Filesystem failure while reading or atomically replacing output.
Trait Implementations§
Source§impl Error for EditError
impl Error for EditError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for EditError
impl !UnwindSafe for EditError
impl Freeze for EditError
impl Send for EditError
impl Sync for EditError
impl Unpin for EditError
impl UnsafeUnpin for EditError
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more