pub struct ExtractPolicy { /* private fields */ }Expand description
Controls behavior shared by Archive::extract_in implementations.
See each configuration API for its default.
Implementations§
Source§impl ExtractPolicy
impl ExtractPolicy
Sourcepub fn link_policy(self, policy: LinkPolicy) -> Self
pub fn link_policy(self, policy: LinkPolicy) -> Self
Configures symbolic- and hard-link extraction behavior.
Sourcepub fn allow_overwrites(self, allow: bool) -> Self
pub fn allow_overwrites(self, allow: bool) -> Self
Configures whether archive members may replace existing entries.
Overwrites are allowed by default. Replacement never follows symbolic links or recursively removes non-empty directories. Real directories are always reused, including when overwrites are disabled.
Sourcepub fn name_validator(self, validator: Option<NameValidator>) -> Self
pub fn name_validator(self, validator: Option<NameValidator>) -> Self
Configures validation for member names and link targets.
Passing None disables configurable name validation. UTF-8 and
extraction containment requirements still apply.
Trait Implementations§
Source§impl Clone for ExtractPolicy
impl Clone for ExtractPolicy
Source§fn clone(&self) -> ExtractPolicy
fn clone(&self) -> ExtractPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExtractPolicy
Source§impl Debug for ExtractPolicy
impl Debug for ExtractPolicy
Auto Trait Implementations§
impl Freeze for ExtractPolicy
impl RefUnwindSafe for ExtractPolicy
impl Send for ExtractPolicy
impl Sync for ExtractPolicy
impl Unpin for ExtractPolicy
impl UnsafeUnpin for ExtractPolicy
impl UnwindSafe for ExtractPolicy
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