pub enum DocumentError {
Open {
path: PathBuf,
source: Error,
},
Map {
path: PathBuf,
source: Error,
},
Write {
path: PathBuf,
source: Error,
},
Encoding {
path: PathBuf,
operation: &'static str,
encoding: DocumentEncoding,
reason: DocumentEncodingErrorKind,
},
EditUnsupported {
path: Option<PathBuf>,
reason: &'static str,
},
}Expand description
File-system, mapping, and edit-capability errors produced by crate::document::Document.
Variants§
Open
The source file could not be opened.
Map
The source file could not be memory-mapped.
Write
A write, rename, or reload step failed.
Encoding
Encoding negotiation, decode, or save conversion failed.
EditUnsupported
The requested edit operation is unsupported for the current document state.
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