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) -> ExtractPolicy
pub fn link_policy(self, policy: LinkPolicy) -> ExtractPolicy
Configures symbolic- and hard-link extraction behavior.
Sourcepub fn allow_overwrites(self, allow: bool) -> ExtractPolicy
pub fn allow_overwrites(self, allow: bool) -> ExtractPolicy
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<fn(&str) -> bool>,
) -> ExtractPolicy
pub fn name_validator( self, validator: Option<fn(&str) -> bool>, ) -> ExtractPolicy
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
Source§impl Default for ExtractPolicy
impl Default for ExtractPolicy
Source§fn default() -> ExtractPolicy
fn default() -> ExtractPolicy
Returns the “default value” for a type. Read more
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