#[non_exhaustive]pub enum WriteError {
Layout(LayoutFault),
Zip64,
NoSuchPart(String),
PartExists(String),
ChangedTwice(String),
TooLarge,
Deflate,
}Expand description
Why write_package could not write a package.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Layout(LayoutFault)
The original’s ZIP records are not where its end record and central directory say.
Zip64
The original uses ZIP64, which the writer does not write.
NoSuchPart(String)
A PartChange::Replace names a part that the package does not hold.
PartExists(String)
A PartChange::Add names a part that the package holds under an equivalent name.
ChangedTwice(String)
Two changes name one part, or parts with equivalent names: the second one’s name.
TooLarge
The package would be larger than Limits::max_written_size, or hold more bytes or
entries than a ZIP file without ZIP64 can.
Deflate
The deflate encoder failed.
Trait Implementations§
Source§impl Clone for WriteError
impl Clone for WriteError
Source§impl Debug for WriteError
impl Debug for WriteError
Source§impl Display for WriteError
impl Display for WriteError
impl Eq for WriteError
Source§impl Error for WriteError
impl Error for WriteError
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()
Source§impl PartialEq for WriteError
impl PartialEq for WriteError
impl StructuralPartialEq for WriteError
Auto Trait Implementations§
impl Forget for WriteError
impl Freeze for WriteError
impl Move for WriteError
impl RefUnwindSafe for WriteError
impl Send for WriteErrorwhere
RawVecInner: Send,
impl Sync for WriteErrorwhere
RawVecInner: Sync,
impl Unpin for WriteError
impl UnsafeUnpin for WriteError
impl UnwindSafe for WriteErrorwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.