pub enum WpdError {
InvalidArgs,
UnsupportedFormat,
ParseError,
OutOfMemory,
Internal,
Encrypted,
InvalidUtf8,
UnsupportedPlatform,
}Expand description
Errors returned when extracting a WordPerfect document.
Variants§
InvalidArgs
The input buffer was empty or a null pointer reached the shim.
UnsupportedFormat
The buffer is not a WordPerfect document libwpd recognizes.
ParseError
libwpd recognized the format but failed to parse the document.
OutOfMemory
The shim could not allocate the output buffer.
Internal
A C++ exception was caught at the FFI boundary.
Encrypted
The document is encrypted or password-protected; libwpd cannot parse
it without a matching password, which this crate never supplies. This
is distinct from ParseError so a caller can tell “needs a password”
from “the file is corrupt”.
InvalidUtf8
The extracted text was not valid UTF-8.
UnsupportedPlatform
WordPerfect extraction is not available on this platform.
Trait Implementations§
Source§impl Error for WpdError
impl Error for WpdError
1.30.0 · 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 WpdError
impl RefUnwindSafe for WpdError
impl Send for WpdError
impl Sync for WpdError
impl Unpin for WpdError
impl UnsafeUnpin for WpdError
impl UnwindSafe for WpdError
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