pub enum ExtractError<E> {
Archive(E),
Filesystem {
operation: &'static str,
path: PathBuf,
source: Error,
},
BlockingTask(JoinError),
UnsafePath {
position: u64,
context: &'static str,
value: String,
reason: &'static str,
},
PathCollision {
path: PathBuf,
},
UnsupportedMember {
position: u64,
path: PathBuf,
kind: SpecialKind,
},
InvalidLink {
position: u64,
path: PathBuf,
target: String,
reason: &'static str,
},
PolicyViolation {
position: u64,
violation: ExtractPolicyViolation,
},
}Expand description
An error produced while securely extracting an archive.
Variants§
Archive(E)
Reading or decoding the underlying archive failed.
Filesystem
A destination filesystem operation failed.
Fields
BlockingTask(JoinError)
A blocking extraction operation failed to complete.
UnsafePath
An archive member path or link value is unsafe to extract.
Fields
PathCollision
An archive entry collides with a path that cannot be replaced.
UnsupportedMember
A special member kind is deliberately excluded from extraction.
Fields
§
kind: SpecialKindUnsupported special-file kind.
InvalidLink
A symbolic or hard link cannot be safely resolved.
Fields
PolicyViolation
A structurally valid member was rejected by extraction policy.
Fields
§
violation: ExtractPolicyViolationThe selected policy rule that rejected the member.
Trait Implementations§
Source§impl<E> Debug for ExtractError<E>where
E: Debug,
impl<E> Debug for ExtractError<E>where
E: Debug,
Source§impl<E> Display for ExtractError<E>where
E: Display,
impl<E> Display for ExtractError<E>where
E: Display,
Source§impl<E> Error for ExtractError<E>
impl<E> Error for ExtractError<E>
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<E> From<JoinError> for ExtractError<E>
impl<E> From<JoinError> for ExtractError<E>
Source§fn from(source: JoinError) -> ExtractError<E>
fn from(source: JoinError) -> ExtractError<E>
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> !RefUnwindSafe for ExtractError<E>
impl<E> !UnwindSafe for ExtractError<E>
impl<E> Freeze for ExtractError<E>where
E: Freeze,
impl<E> Send for ExtractError<E>where
E: Send,
impl<E> Sync for ExtractError<E>where
E: Sync,
impl<E> Unpin for ExtractError<E>where
E: Unpin,
impl<E> UnsafeUnpin for ExtractError<E>where
E: UnsafeUnpin,
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