#[non_exhaustive]pub enum Error {
Show 14 variants
Io(Error),
NotZip,
CompoundFile,
NoPresentationStream,
Encrypted(String),
Zip {
offset: u64,
msg: String,
},
Unsupported(String),
Inflate(String),
Xml {
part: String,
offset: usize,
msg: String,
},
MissingPart(String),
MissingRelationship {
part: String,
id: String,
},
NotAPresentation,
SlideNotFound(usize),
Other(String),
}Expand description
Everything that can go wrong while reading a package.
Reading is lenient, so most defects never become errors: they are
recorded in a report next to the result. An Error means the caller
received nothing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
NotZip
No end of central directory record: the bytes are not a ZIP archive.
CompoundFile
An OLE compound file where an ECMA-376 package was required.
NoPresentationStream
An OLE compound file with no presentation inside.
Encrypted(String)
A password-protected document; the reader does not decrypt it.
Zip
A structurally broken ZIP record at the given byte offset.
Unsupported(String)
A ZIP feature the reader does not implement.
Inflate(String)
The compressed data of an entry could not be inflated.
Xml
Malformed XML in a part.
MissingPart(String)
A part the document model requires is absent.
MissingRelationship
A relationship id referenced from a part has no entry in its rels.
NotAPresentation
The package has no presentation part reachable from the package rels.
SlideNotFound(usize)
Other(String)
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()