pub enum Error {
NotOle2,
Cfb(Error),
MissingStream(&'static str),
Fib(&'static str),
PieceTable(String),
Encrypted {
obfuscated: bool,
},
UnsupportedVersion(u16),
NoText,
Docx(String),
Render(String),
}Expand description
Errors produced while opening or decoding a .doc file.
Variants§
NotOle2
The input is not an OLE2 / CFB compound file (.doc is OLE2-based).
Cfb(Error)
The OLE2 container could not be opened.
MissingStream(&'static str)
A required stream (WordDocument / 0Table / 1Table) is missing.
Fib(&'static str)
The File Information Block (FIB) is malformed (bad magic, truncated).
PieceTable(String)
The piece table (CLX / PlcPcd) is malformed.
Encrypted
The document is encrypted or XOR-obfuscated (fEncrypted). Extraction is
refused rather than emitting scrambled bytes. obfuscated is true for
the [MS-DOC] 2.2.6.1 XOR scheme, false for RC4/CryptoAPI encryption.
UnsupportedVersion(u16)
The document is an unsupported pre-Word-97 version (nFib < 0x00C1,
i.e. Word 6/95): all-8-bit text with a different FIB/piece-table layout.
NoText
The document parsed but contained no indexable text.
Docx(String)
A modern .docx (OOXML / ZIP container) could not be read — a malformed
ZIP, a missing word/document.xml, or .docx support not compiled in
(the docx cargo feature is disabled).
Render(String)
Native PDF rendering failed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()