#[non_exhaustive]pub struct AllowedFeatures {
pub symlinks: bool,
pub hardlinks: bool,
pub absolute_paths: bool,
pub world_writable: bool,
pub windows_reserved_names: bool,
}Expand description
Feature flags controlling what archive features are allowed during extraction.
All features default to false (deny-by-default security policy).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.symlinks: boolAllow symlinks in extracted archives.
hardlinks: boolAllow hardlinks in extracted archives.
absolute_paths: boolAllow absolute paths in archive entries.
world_writable: boolAllow world-writable files (mode 0o002).
World-writable files pose security risks in multi-user environments.
windows_reserved_names: boolAllow Windows reserved device names (CON, NUL, COM1, …) as path
components.
Only consulted when extracting on Windows; has no effect elsewhere. There is no CLI or binding opt-out, and the permissive preset does not enable it.
Trait Implementations§
Source§impl Clone for AllowedFeatures
impl Clone for AllowedFeatures
impl Copy for AllowedFeatures
Source§impl Debug for AllowedFeatures
impl Debug for AllowedFeatures
Source§impl Default for AllowedFeatures
impl Default for AllowedFeatures
impl Eq for AllowedFeatures
Source§impl PartialEq for AllowedFeatures
impl PartialEq for AllowedFeatures
impl StructuralPartialEq for AllowedFeatures
Auto Trait Implementations§
impl Freeze for AllowedFeatures
impl RefUnwindSafe for AllowedFeatures
impl Send for AllowedFeatures
impl Sync for AllowedFeatures
impl Unpin for AllowedFeatures
impl UnsafeUnpin for AllowedFeatures
impl UnwindSafe for AllowedFeatures
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.